diff --git a/4.0/openapi.yml b/4.0/openapi.yml index cb0007d22258af5b5403d26dc2371571e683bdfb..149e628a02ed8b0c2bf359285ea744ca38e4302d 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.699 + version: 4.0.700 openapi: 3.0.3 paths: /cntl/column/create: diff --git a/4.0/version_numeric b/4.0/version_numeric index 6a2a6d56ad7e64f81e84e89578afd9bdf275f674..0dbca2365d52a570903e8aa1cb4c46feddea82c9 100644 --- a/4.0/version_numeric +++ b/4.0/version_numeric @@ -1 +1 @@ -4.0.699 \ No newline at end of file +4.0.700 \ No newline at end of file diff --git a/4.1/functions.json b/4.1/functions.json index c9af905b2b1406f3158b7c096a6671971dab5f00..579ea8621e4aa021cbbeb574b36eef43a1625df0 100644 --- a/4.1/functions.json +++ b/4.1/functions.json @@ -111,7 +111,7 @@ "data_default": false }, "data_type": "boolean", - "is_deprecated": false + "is_deprecated": true }, "value_stop": { "new": { @@ -128,7 +128,7 @@ "data_default": false }, "data_type": "boolean", - "is_deprecated": false + "is_deprecated": true }, "value_start": { "new": { @@ -480,7 +480,7 @@ "is_required": false }, "data_type": "boolean", - "is_deprecated": false + "is_deprecated": true }, "value_stop": { "old": { @@ -496,7 +496,7 @@ "is_required": false }, "data_type": "boolean", - "is_deprecated": false + "is_deprecated": true }, "value_start": { "old": { diff --git a/4.1/openapi.yml b/4.1/openapi.yml index 62ffdcb767c78be24ea383a79bca2f9ba9e0efe2..a017ca737a84927bddea62e401fc44a22c659213 100644 --- a/4.1/openapi.yml +++ b/4.1/openapi.yml @@ -4064,7 +4064,7 @@ info: \ nicht Bestandteil dieser Dokumentation, sondern \xFCber selbstdokumentierende\ \ Indexabfragen der WebAPI erreichbar." title: SCC NETDB-API - version: 4.1.153 + version: 4.1.158 openapi: 3.0.3 paths: /cntl/column/create: diff --git a/4.1/version_numeric b/4.1/version_numeric index 9ccb11fc3d17c7b79d41def6f680802836b613fb..89206cb1124b193c691a6b6c40d7a7b500316d0e 100644 --- a/4.1/version_numeric +++ b/4.1/version_numeric @@ -1 +1 @@ -4.1.153 \ No newline at end of file +4.1.158 \ No newline at end of file diff --git a/4.2/es/cntl.table.js b/4.2/es/cntl.table.js index ec92d90fdcd49b85ef141f6e29682f49c80d82c6..7d9559daa21604bbc0ee4e40fdc4e89606aaec08 100644 --- a/4.2/es/cntl.table.js +++ b/4.2/es/cntl.table.js @@ -14,10 +14,10 @@ import NETVSConfig from '@/../netvs.config' export default { createParamsList () { - return {'old': [ ], 'new': [ 'name', 'system', 'is_log_dst', 'is_log_src', 'is_lang_dst', 'is_lang_src', 'is_otattr_dst', 'is_otattr_src', 'content_gender', 'do_imp_from_dd', 'object_type_name', 'do_activate_global_pk2obj', 'do_create_global_ref_params', 'object_type_grants_read_access']} + return {'old': [ ], 'new': [ 'name', 'system', 'is_log_dst', 'is_log_src', 'is_lang_dst', 'is_lang_src', 'is_otattr_dst', 'is_otattr_src', 'content_gender', 'do_imp_from_dd', 'object_type_name', 'object_type_is_generic', 'do_activate_global_pk2obj', 'do_create_global_ref_params', 'object_type_grants_read_access']} }, - create (config, {name_new, system_new, is_log_dst_new = false, is_log_src_new = false, is_lang_dst_new, is_lang_src_new, is_otattr_dst_new = false, is_otattr_src_new = false, content_gender_new, do_imp_from_dd_new = true, object_type_name_new, do_activate_global_pk2obj_new, do_create_global_ref_params_new = true, object_type_grants_read_access_new = false}) { - const params = { 'new': { 'name': name_new, 'system': system_new, 'is_log_dst': is_log_dst_new, 'is_log_src': is_log_src_new, 'is_lang_dst': is_lang_dst_new, 'is_lang_src': is_lang_src_new, 'is_otattr_dst': is_otattr_dst_new, 'is_otattr_src': is_otattr_src_new, 'content_gender': content_gender_new, 'do_imp_from_dd': do_imp_from_dd_new, 'object_type_name': object_type_name_new, 'do_activate_global_pk2obj': do_activate_global_pk2obj_new, 'do_create_global_ref_params': do_create_global_ref_params_new, 'object_type_grants_read_access': object_type_grants_read_access_new}, 'old': { }} + create (config, {name_new, system_new, is_log_dst_new = false, is_log_src_new = false, is_lang_dst_new, is_lang_src_new, is_otattr_dst_new = false, is_otattr_src_new = false, content_gender_new, do_imp_from_dd_new = true, object_type_name_new, object_type_is_generic_new = false, do_activate_global_pk2obj_new, do_create_global_ref_params_new = true, object_type_grants_read_access_new = false}) { + const params = { 'new': { 'name': name_new, 'system': system_new, 'is_log_dst': is_log_dst_new, 'is_log_src': is_log_src_new, 'is_lang_dst': is_lang_dst_new, 'is_lang_src': is_lang_src_new, 'is_otattr_dst': is_otattr_dst_new, 'is_otattr_src': is_otattr_src_new, 'content_gender': content_gender_new, 'do_imp_from_dd': do_imp_from_dd_new, 'object_type_name': object_type_name_new, 'object_type_is_generic': object_type_is_generic_new, 'do_activate_global_pk2obj': do_activate_global_pk2obj_new, 'do_create_global_ref_params': do_create_global_ref_params_new, 'object_type_grants_read_access': object_type_grants_read_access_new}, 'old': { }} // TODO: Return ta-object instead return Axios.post(`${NETVSConfig.NETDB_API_BASE_URL}/${NETVSConfig.NETDB_API_VERSION}/cntl/table/create`, params, (config || {}).netdb_axios_config) // eslint-disable-next-line comma-dangle @@ -31,8 +31,8 @@ export default { return Axios.post(`${NETVSConfig.NETDB_API_BASE_URL}/${NETVSConfig.NETDB_API_VERSION}/cntl/table/delete`, params, (config || {}).netdb_axios_config) // eslint-disable-next-line comma-dangle }, - list (config, { system, gpk_list, name_list, is_log_dst, is_log_src, fetch_limit, is_lang_dst, is_lang_src, fetch_offset, is_otattr_dst, is_otattr_src, pg_cls_exists, filter_params_dict, object_type_fq_name, sorting_params_list, do_activate_global_pk2obj, object_type_grants_read_access }) { - const params = APIUtils.denullify_dict({ 'system': system, 'gpk_list': (gpk_list === null) ? null : JSON.stringify(gpk_list), 'name_list': (name_list === null) ? null : JSON.stringify(name_list), 'is_log_dst': is_log_dst, 'is_log_src': is_log_src, 'fetch_limit': fetch_limit, 'is_lang_dst': is_lang_dst, 'is_lang_src': is_lang_src, 'fetch_offset': fetch_offset, 'is_otattr_dst': is_otattr_dst, 'is_otattr_src': is_otattr_src, 'pg_class_exists': pg_cls_exists, '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), 'do_activate_global_pk2obj': do_activate_global_pk2obj, 'object_type_grants_read_access': object_type_grants_read_access}) + list (config, { system, gpk_list, name_list, is_log_dst, is_log_src, fetch_limit, is_lang_dst, is_lang_src, fetch_offset, is_otattr_dst, is_otattr_src, pg_cls_exists, filter_params_dict, object_type_fq_name, sorting_params_list, object_type_is_generic, do_activate_global_pk2obj, object_type_grants_read_access }) { + const params = APIUtils.denullify_dict({ 'system': system, 'gpk_list': (gpk_list === null) ? null : JSON.stringify(gpk_list), 'name_list': (name_list === null) ? null : JSON.stringify(name_list), 'is_log_dst': is_log_dst, 'is_log_src': is_log_src, 'fetch_limit': fetch_limit, 'is_lang_dst': is_lang_dst, 'is_lang_src': is_lang_src, 'fetch_offset': fetch_offset, 'is_otattr_dst': is_otattr_dst, 'is_otattr_src': is_otattr_src, 'pg_class_exists': pg_cls_exists, '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), 'object_type_is_generic': object_type_is_generic, 'do_activate_global_pk2obj': do_activate_global_pk2obj, 'object_type_grants_read_access': object_type_grants_read_access}) const cnf = {} Object.assign(cnf, (config || {}).netdb_axios_config) cnf.params = params @@ -40,10 +40,10 @@ export default { // eslint-disable-next-line comma-dangle }, updateParamsList () { - return {'old': [ 'name'], 'new': [ 'name', 'system', 'is_log_dst', 'is_log_src', 'is_lang_dst', 'is_lang_src', 'is_otattr_dst', 'is_otattr_src', 'content_gender', 'do_imp_from_dd', 'object_type_name', 'do_imp_from_dd_upd_cols', 'do_activate_global_pk2obj', 'do_create_global_ref_params', 'object_type_grants_read_access', 'make_generic_object_type_permissions']} + return {'old': [ 'name'], 'new': [ 'name', 'system', 'is_log_dst', 'is_log_src', 'is_lang_dst', 'is_lang_src', 'is_otattr_dst', 'is_otattr_src', 'content_gender', 'do_imp_from_dd', 'object_type_name', 'object_type_is_generic', 'do_imp_from_dd_upd_cols', 'do_activate_global_pk2obj', 'do_create_global_ref_params', 'object_type_grants_read_access', 'make_generic_object_type_permissions']} }, - update (config, {name_old, name_new, system_new, is_log_dst_new, is_log_src_new, is_lang_dst_new, is_lang_src_new, is_otattr_dst_new, is_otattr_src_new, content_gender_new, do_imp_from_dd_new, object_type_name_new, do_imp_from_dd_upd_cols_new, do_activate_global_pk2obj_new, do_create_global_ref_params_new, object_type_grants_read_access_new, make_generic_object_type_permissions_new = true}) { - const params = { 'new': { 'name': name_new, 'system': system_new, 'is_log_dst': is_log_dst_new, 'is_log_src': is_log_src_new, 'is_lang_dst': is_lang_dst_new, 'is_lang_src': is_lang_src_new, 'is_otattr_dst': is_otattr_dst_new, 'is_otattr_src': is_otattr_src_new, 'content_gender': content_gender_new, 'do_imp_from_dd': do_imp_from_dd_new, 'object_type_name': object_type_name_new, 'do_imp_from_dd_upd_cols': do_imp_from_dd_upd_cols_new, 'do_activate_global_pk2obj': do_activate_global_pk2obj_new, 'do_create_global_ref_params': do_create_global_ref_params_new, 'object_type_grants_read_access': object_type_grants_read_access_new, 'make_generic_object_type_permissions': make_generic_object_type_permissions_new}, 'old': { 'name': name_old}} + update (config, {name_old, name_new, system_new, is_log_dst_new, is_log_src_new, is_lang_dst_new, is_lang_src_new, is_otattr_dst_new, is_otattr_src_new, content_gender_new, do_imp_from_dd_new, object_type_name_new, object_type_is_generic_new, do_imp_from_dd_upd_cols_new, do_activate_global_pk2obj_new, do_create_global_ref_params_new, object_type_grants_read_access_new, make_generic_object_type_permissions_new = true}) { + const params = { 'new': { 'name': name_new, 'system': system_new, 'is_log_dst': is_log_dst_new, 'is_log_src': is_log_src_new, 'is_lang_dst': is_lang_dst_new, 'is_lang_src': is_lang_src_new, 'is_otattr_dst': is_otattr_dst_new, 'is_otattr_src': is_otattr_src_new, 'content_gender': content_gender_new, 'do_imp_from_dd': do_imp_from_dd_new, 'object_type_name': object_type_name_new, 'object_type_is_generic': object_type_is_generic_new, 'do_imp_from_dd_upd_cols': do_imp_from_dd_upd_cols_new, 'do_activate_global_pk2obj': do_activate_global_pk2obj_new, 'do_create_global_ref_params': do_create_global_ref_params_new, 'object_type_grants_read_access': object_type_grants_read_access_new, 'make_generic_object_type_permissions': make_generic_object_type_permissions_new}, 'old': { 'name': name_old}} // TODO: Return ta-object instead return Axios.post(`${NETVSConfig.NETDB_API_BASE_URL}/${NETVSConfig.NETDB_API_VERSION}/cntl/table/update`, params, (config || {}).netdb_axios_config) // eslint-disable-next-line comma-dangle diff --git a/4.2/es/dns.ip_addr.js b/4.2/es/dns.ip_addr.js index efb7607a3f75f1630039fbff8560bca1e591b632..1db8c12fff25f48ff682433c836d59bf2a8c7c2b 100644 --- a/4.2/es/dns.ip_addr.js +++ b/4.2/es/dns.ip_addr.js @@ -13,20 +13,11 @@ import NETVSConfig from '@/../netvs.config' /* eslint-disable object-shorthand */ export default { - bulk_createParamsList () { - return {'old': [ ], 'new': [ 'is_dhcp', 'is_reserved']} - }, - 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_updateParamsList () { - return {'old': [ 'cidr'], 'new': [ 'cidr', 'is_dhcp', 'is_reserved']} + return {'old': [ 'cidr'], 'new': [ 'cidr']} }, - 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}} + bulk_update (config, {cidr_old, cidr_new}) { + const params = { 'new': { 'cidr': cidr_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 diff --git a/4.2/functions.json b/4.2/functions.json index 52fcceb8d0411b812c57de7c95860015f16e1e94..14a8e4376f44705a004f9edeac50d0137c7497fa 100644 --- a/4.2/functions.json +++ b/4.2/functions.json @@ -99,35 +99,6 @@ "is_executable": true, "is_data_manipulating": true }, - { - "name": "bulk_create", - "system": "dns", - "fq_name": "dns.ip_addr.bulk_create", - "parameters": { - "is_dhcp": { - "new": { - "is_nullable": false, - "is_required": false, - "data_default": false - }, - "data_type": "boolean", - "is_deprecated": false - }, - "is_reserved": { - "new": { - "is_nullable": false, - "is_required": false, - "data_default": false - }, - "data_type": "boolean", - "is_deprecated": false - } - }, - "object_type": "ip_addr", - "is_returning": false, - "is_executable": true, - "is_data_manipulating": true - }, { "name": "bulk_disconnect", "system": "nd", @@ -331,22 +302,6 @@ }, "data_type": "ip_network", "is_deprecated": false - }, - "is_dhcp": { - "new": { - "is_nullable": false, - "is_required": false - }, - "data_type": "boolean", - "is_deprecated": false - }, - "is_reserved": { - "new": { - "is_nullable": false, - "is_required": false - }, - "data_type": "boolean", - "is_deprecated": false } }, "object_type": "ip_addr", @@ -2089,6 +2044,15 @@ "data_type": "text_sql_identifier", "is_deprecated": false }, + "object_type_is_generic": { + "new": { + "is_nullable": false, + "is_required": false, + "data_default": false + }, + "data_type": "boolean", + "is_deprecated": false + }, "do_activate_global_pk2obj": { "new": { "is_nullable": false, @@ -11330,6 +11294,14 @@ "data_type": "text_array", "is_deprecated": false }, + "object_type_is_generic": { + "old": { + "is_nullable": false, + "is_required": false + }, + "data_type": "boolean", + "is_deprecated": false + }, "do_activate_global_pk2obj": { "old": { "is_nullable": false, @@ -20820,6 +20792,14 @@ "data_type": "text_sql_identifier", "is_deprecated": false }, + "object_type_is_generic": { + "new": { + "is_nullable": false, + "is_required": false + }, + "data_type": "boolean", + "is_deprecated": false + }, "do_imp_from_dd_upd_cols": { "new": { "is_nullable": false, diff --git a/4.2/golang/structs.go b/4.2/golang/structs.go index f3ab8bd88c75bdca610e9e29b9cbff576f977914..6c7bf484dc5ff69a049c05031fb3d2b6d9c0dc6a 100644 --- a/4.2/golang/structs.go +++ b/4.2/golang/structs.go @@ -326,6 +326,7 @@ type CntlTable struct { ContentGender string `mapstructure:"content_gender"` PgClassExists bool `mapstructure:"pg_class_exists"` ObjectTypeFqName string `mapstructure:"object_type_fq_name"` + ObjectTypeIsGeneric bool `mapstructure:"object_type_is_generic"` DoActivateGlobalPk2obj bool `mapstructure:"do_activate_global_pk2obj"` ObjectTypeGrantsReadAccess bool `mapstructure:"object_type_grants_read_access"` } diff --git a/4.2/objects.json b/4.2/objects.json index e81a02f0a64c3c0fb14d7a77b0b4916a9fb22a0e..e87743649b424d0c3879bd996f4227d0859cd707 100644 --- a/4.2/objects.json +++ b/4.2/objects.json @@ -22298,6 +22298,12 @@ "is_nullable": false, "is_deprecated": false }, + "object_type_is_generic": { + "is_core": true, + "data_type": "boolean", + "is_nullable": false, + "is_deprecated": false + }, "do_activate_global_pk2obj": { "is_core": true, "data_type": "boolean", diff --git a/4.2/openapi.yml b/4.2/openapi.yml index 4234f25ec95eb2ab439281d92ce78394f61f4feb..5dea5e8b0608fd91889abb57ab50952a92836013 100644 --- a/4.2/openapi.yml +++ b/4.2/openapi.yml @@ -914,6 +914,9 @@ components: object_type_grants_read_access: description: Wenn aktiviert, ist Lesezugriff auf Objekte dieses Typs freigeschaltet. type: boolean + object_type_is_generic: + description: '' + type: boolean pg_class_exists: description: gleichnamiger Datensatz im PostgreSQL-Systemkatalog 'pg_class' vorhanden @@ -4081,7 +4084,7 @@ info: \ nicht Bestandteil dieser Dokumentation, sondern \xFCber selbstdokumentierende\ \ Indexabfragen der WebAPI erreichbar." title: SCC NETDB-API - version: 4.2.9 + version: 4.2.3 openapi: 3.0.3 paths: /cntl/column/create: @@ -10927,6 +10930,11 @@ paths: Typs freigeschaltet. nullable: false type: boolean + object_type_is_generic: + default: false + description: '' + nullable: false + type: boolean object_type_name: description: Name, unter dem die Tabelle incl. deren als WebAPI-Attribut gekennzeichneten Spalten als Web-API-Objekttyp angesprochen @@ -11142,6 +11150,13 @@ paths: format: '["value1","value2",...]' nullable: false type: string + - description: '' + in: query + name: object_type_is_generic + required: false + schema: + nullable: false + type: boolean - description: "Zuordnung der Objekt-Datens\xE4tze zu globalen Prim\xE4rschl\xFC\ sseln erm\xF6glichen. ACHTUNG: \xC4nderung nur gemeinsam mit Code-Anpassung\ \ machen!" @@ -11269,6 +11284,10 @@ paths: Typs freigeschaltet. nullable: false type: boolean + object_type_is_generic: + description: '' + nullable: false + type: boolean object_type_name: description: Name, unter dem die Tabelle incl. deren als WebAPI-Attribut gekennzeichneten Spalten als Web-API-Objekttyp angesprochen @@ -15002,44 +15021,6 @@ paths: - api_key: [] tags: - dns - /dns/ip_addr/bulk_create: - post: - requestBody: - content: - application/json: - schema: - properties: - new: - description: Neue Angaben - properties: - is_dhcp: - default: false - description: "Die IP-Adresse geh\xF6rt zum DHCP-Adre\xDFpool\ - \ des Subnetzes" - nullable: false - type: boolean - is_reserved: - default: false - description: "Die IP-Adresse ist f\xFCr netztechnische Zwecke\ - \ reserviert" - nullable: false - type: boolean - 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_update: post: requestBody: @@ -15054,16 +15035,6 @@ paths: description: IP-Subnetzangabe in CIDR-Notation nullable: false type: string - is_dhcp: - description: "Die IP-Adresse geh\xF6rt zum DHCP-Adre\xDFpool\ - \ des Subnetzes" - nullable: false - type: boolean - is_reserved: - description: "Die IP-Adresse ist f\xFCr netztechnische Zwecke\ - \ reserviert" - nullable: false - type: boolean required: - cidr type: object diff --git a/4.2/python/cntl.py b/4.2/python/cntl.py index 424b4d2ae0acd3f8104081b30df33c500de7d1c0..733a415ce5d113b541e9dca812958cc00435af55 100644 --- a/4.2/python/cntl.py +++ b/4.2/python/cntl.py @@ -1259,6 +1259,7 @@ class Table(APIObject): content_gender: str pg_cls_exists: bool object_type_fq_name: str + object_type_is_generic: bool do_activate_global_pk2obj: bool object_type_grants_read_access: bool @@ -1287,13 +1288,15 @@ class Table(APIObject): raise ValueError(f"'pg_cls_exists' of incorrect type. Expected bool, got {type(self.pg_cls_exists)}") 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)}") + if not isinstance(self.object_type_is_generic, bool): + raise ValueError(f"'object_type_is_generic' of incorrect type. Expected bool, got {type(self.object_type_is_generic)}") if not isinstance(self.do_activate_global_pk2obj, bool): raise ValueError(f"'do_activate_global_pk2obj' of incorrect type. Expected bool, got {type(self.do_activate_global_pk2obj)}") if not isinstance(self.object_type_grants_read_access, bool): raise ValueError(f"'object_type_grants_read_access' of incorrect type. Expected bool, got {type(self.object_type_grants_read_access)}") @staticmethod - def create_ta(name_new: str, system_new: str, is_lang_dst_new: bool, is_lang_src_new: bool, content_gender_new: str, do_activate_global_pk2obj_new: bool, is_log_dst_new: bool = False, is_log_src_new: bool = False, is_otattr_dst_new: bool = False, is_otattr_src_new: bool = False, do_imp_from_dd_new: bool = True, object_type_name_new: str = None, do_create_global_ref_params_new: bool = True, object_type_grants_read_access_new: bool = False) -> dict: + def create_ta(name_new: str, system_new: str, is_lang_dst_new: bool, is_lang_src_new: bool, content_gender_new: str, do_activate_global_pk2obj_new: bool, is_log_dst_new: bool = False, is_log_src_new: bool = False, is_otattr_dst_new: bool = False, is_otattr_src_new: bool = False, do_imp_from_dd_new: bool = True, object_type_name_new: str = None, object_type_is_generic_new: bool = False, do_create_global_ref_params_new: bool = True, object_type_grants_read_access_new: bool = False) -> dict: if not (isinstance(name_new, str)): raise ValueError(f"'name' of incorrect type. Expected str, got {type(name_new)}") if not (isinstance(system_new, str)): @@ -1316,6 +1319,8 @@ class Table(APIObject): raise ValueError(f"'do_imp_from_dd' of incorrect type. Expected bool, got {type(do_imp_from_dd_new)}") if object_type_name_new is not None and not (isinstance(object_type_name_new, str)): raise ValueError(f"'object_type_name' of incorrect type. Expected str, got {type(object_type_name_new)}") + if object_type_is_generic_new is not None and not (isinstance(object_type_is_generic_new, bool)): + raise ValueError(f"'object_type_is_generic' of incorrect type. Expected bool, got {type(object_type_is_generic_new)}") if not (isinstance(do_activate_global_pk2obj_new, bool)): raise ValueError(f"'do_activate_global_pk2obj' of incorrect type. Expected bool, got {type(do_activate_global_pk2obj_new)}") if do_create_global_ref_params_new is not None and not (isinstance(do_create_global_ref_params_new, bool)): @@ -1323,11 +1328,11 @@ class Table(APIObject): if object_type_grants_read_access_new is not None and not (isinstance(object_type_grants_read_access_new, bool)): raise ValueError(f"'object_type_grants_read_access' of incorrect type. Expected bool, got {type(object_type_grants_read_access_new)}") - return {'name': 'cntl.table.create', 'new': _denullify_dict({'name': name_new, 'system': system_new, 'is_log_dst': is_log_dst_new, 'is_log_src': is_log_src_new, 'is_lang_dst': is_lang_dst_new, 'is_lang_src': is_lang_src_new, 'is_otattr_dst': is_otattr_dst_new, 'is_otattr_src': is_otattr_src_new, 'content_gender': content_gender_new, 'do_imp_from_dd': do_imp_from_dd_new, 'object_type_name': object_type_name_new, 'do_activate_global_pk2obj': do_activate_global_pk2obj_new, 'do_create_global_ref_params': do_create_global_ref_params_new, 'object_type_grants_read_access': object_type_grants_read_access_new}), 'old': _denullify_dict({})} + return {'name': 'cntl.table.create', 'new': _denullify_dict({'name': name_new, 'system': system_new, 'is_log_dst': is_log_dst_new, 'is_log_src': is_log_src_new, 'is_lang_dst': is_lang_dst_new, 'is_lang_src': is_lang_src_new, 'is_otattr_dst': is_otattr_dst_new, 'is_otattr_src': is_otattr_src_new, 'content_gender': content_gender_new, 'do_imp_from_dd': do_imp_from_dd_new, 'object_type_name': object_type_name_new, 'object_type_is_generic': object_type_is_generic_new, 'do_activate_global_pk2obj': do_activate_global_pk2obj_new, 'do_create_global_ref_params': do_create_global_ref_params_new, 'object_type_grants_read_access': object_type_grants_read_access_new}), 'old': _denullify_dict({})} # TODO: Consider is_returning @classmethod - def create(cls, api_session: APISession, name_new: str, system_new: str, is_lang_dst_new: bool, is_lang_src_new: bool, content_gender_new: str, do_activate_global_pk2obj_new: bool, is_log_dst_new: bool = False, is_log_src_new: bool = False, is_otattr_dst_new: bool = False, is_otattr_src_new: bool = False, do_imp_from_dd_new: bool = True, object_type_name_new: str = None, do_create_global_ref_params_new: bool = True, object_type_grants_read_access_new: bool = False) -> list: + def create(cls, api_session: APISession, name_new: str, system_new: str, is_lang_dst_new: bool, is_lang_src_new: bool, content_gender_new: str, do_activate_global_pk2obj_new: bool, is_log_dst_new: bool = False, is_log_src_new: bool = False, is_otattr_dst_new: bool = False, is_otattr_src_new: bool = False, do_imp_from_dd_new: bool = True, object_type_name_new: str = None, object_type_is_generic_new: bool = False, do_create_global_ref_params_new: bool = True, object_type_grants_read_access_new: bool = False) -> list: if not (isinstance(name_new, str)): raise ValueError(f"'name' of incorrect type. Expected str, got {type(name_new)}") if not (isinstance(system_new, str)): @@ -1350,6 +1355,8 @@ class Table(APIObject): raise ValueError(f"'do_imp_from_dd' of incorrect type. Expected bool, got {type(do_imp_from_dd_new)}") if object_type_name_new is not None and not (isinstance(object_type_name_new, str)): raise ValueError(f"'object_type_name' of incorrect type. Expected str, got {type(object_type_name_new)}") + if object_type_is_generic_new is not None and not (isinstance(object_type_is_generic_new, bool)): + raise ValueError(f"'object_type_is_generic' of incorrect type. Expected bool, got {type(object_type_is_generic_new)}") if not (isinstance(do_activate_global_pk2obj_new, bool)): raise ValueError(f"'do_activate_global_pk2obj' of incorrect type. Expected bool, got {type(do_activate_global_pk2obj_new)}") if do_create_global_ref_params_new is not None and not (isinstance(do_create_global_ref_params_new, bool)): @@ -1357,7 +1364,7 @@ class Table(APIObject): if object_type_grants_read_access_new is not None and not (isinstance(object_type_grants_read_access_new, bool)): raise ValueError(f"'object_type_grants_read_access' of incorrect type. Expected bool, got {type(object_type_grants_read_access_new)}") - res = api_session.session.post(api_session.base_url + '/wapi/transaction/execute', json=[cls.create_ta(name_new=name_new, system_new=system_new, is_log_dst_new=is_log_dst_new, is_log_src_new=is_log_src_new, is_lang_dst_new=is_lang_dst_new, is_lang_src_new=is_lang_src_new, is_otattr_dst_new=is_otattr_dst_new, is_otattr_src_new=is_otattr_src_new, content_gender_new=content_gender_new, do_imp_from_dd_new=do_imp_from_dd_new, object_type_name_new=object_type_name_new, do_activate_global_pk2obj_new=do_activate_global_pk2obj_new, do_create_global_ref_params_new=do_create_global_ref_params_new, object_type_grants_read_access_new=object_type_grants_read_access_new, )]) + res = api_session.session.post(api_session.base_url + '/wapi/transaction/execute', json=[cls.create_ta(name_new=name_new, system_new=system_new, is_log_dst_new=is_log_dst_new, is_log_src_new=is_log_src_new, is_lang_dst_new=is_lang_dst_new, is_lang_src_new=is_lang_src_new, is_otattr_dst_new=is_otattr_dst_new, is_otattr_src_new=is_otattr_src_new, content_gender_new=content_gender_new, do_imp_from_dd_new=do_imp_from_dd_new, object_type_name_new=object_type_name_new, object_type_is_generic_new=object_type_is_generic_new, do_activate_global_pk2obj_new=do_activate_global_pk2obj_new, do_create_global_ref_params_new=do_create_global_ref_params_new, object_type_grants_read_access_new=object_type_grants_read_access_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]] @@ -1385,7 +1392,7 @@ class Table(APIObject): return [cls(**s) for s in res.json()[0]] @staticmethod - def list_ta(system_old: str = None, gpk_list_old: list = None, name_list_old: list = None, is_log_dst_old: bool = None, is_log_src_old: bool = None, fetch_limit_old: int = None, is_lang_dst_old: bool = None, is_lang_src_old: bool = None, fetch_offset_old: int = None, is_otattr_dst_old: bool = None, is_otattr_src_old: bool = None, pg_cls_exists_old: bool = None, filter_params_dict_old: dict = None, object_type_fq_name_old: str = None, sorting_params_list_old: list = None, do_activate_global_pk2obj_old: bool = None, object_type_grants_read_access_old: bool = None) -> dict: + def list_ta(system_old: str = None, gpk_list_old: list = None, name_list_old: list = None, is_log_dst_old: bool = None, is_log_src_old: bool = None, fetch_limit_old: int = None, is_lang_dst_old: bool = None, is_lang_src_old: bool = None, fetch_offset_old: int = None, is_otattr_dst_old: bool = None, is_otattr_src_old: bool = None, pg_cls_exists_old: bool = None, filter_params_dict_old: dict = None, object_type_fq_name_old: str = None, sorting_params_list_old: list = None, object_type_is_generic_old: bool = None, do_activate_global_pk2obj_old: bool = None, object_type_grants_read_access_old: bool = None) -> dict: if system_old is not None and not (isinstance(system_old, str)): raise ValueError(f"'system' of incorrect type. Expected str, got {type(system_old)}") if gpk_list_old is not None and not (isinstance(gpk_list_old, list)): @@ -1416,16 +1423,18 @@ class Table(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 object_type_is_generic_old is not None and not (isinstance(object_type_is_generic_old, bool)): + raise ValueError(f"'object_type_is_generic' of incorrect type. Expected bool, got {type(object_type_is_generic_old)}") if do_activate_global_pk2obj_old is not None and not (isinstance(do_activate_global_pk2obj_old, bool)): raise ValueError(f"'do_activate_global_pk2obj' of incorrect type. Expected bool, got {type(do_activate_global_pk2obj_old)}") if object_type_grants_read_access_old is not None and not (isinstance(object_type_grants_read_access_old, bool)): raise ValueError(f"'object_type_grants_read_access' of incorrect type. Expected bool, got {type(object_type_grants_read_access_old)}") - return {'name': 'cntl.table.list', 'new': _denullify_dict({}), 'old': _denullify_dict({'system': system_old, 'gpk_list': gpk_list_old, 'name_list': name_list_old, 'is_log_dst': is_log_dst_old, 'is_log_src': is_log_src_old, 'fetch_limit': fetch_limit_old, 'is_lang_dst': is_lang_dst_old, 'is_lang_src': is_lang_src_old, 'fetch_offset': fetch_offset_old, 'is_otattr_dst': is_otattr_dst_old, 'is_otattr_src': is_otattr_src_old, 'pg_cls_exists': pg_cls_exists_old, 'filter_params_dict': filter_params_dict_old, 'object_type_fq_name': object_type_fq_name_old, 'sorting_params_list': sorting_params_list_old, 'do_activate_global_pk2obj': do_activate_global_pk2obj_old, 'object_type_grants_read_access': object_type_grants_read_access_old})} + return {'name': 'cntl.table.list', 'new': _denullify_dict({}), 'old': _denullify_dict({'system': system_old, 'gpk_list': gpk_list_old, 'name_list': name_list_old, 'is_log_dst': is_log_dst_old, 'is_log_src': is_log_src_old, 'fetch_limit': fetch_limit_old, 'is_lang_dst': is_lang_dst_old, 'is_lang_src': is_lang_src_old, 'fetch_offset': fetch_offset_old, 'is_otattr_dst': is_otattr_dst_old, 'is_otattr_src': is_otattr_src_old, 'pg_cls_exists': pg_cls_exists_old, 'filter_params_dict': filter_params_dict_old, 'object_type_fq_name': object_type_fq_name_old, 'sorting_params_list': sorting_params_list_old, 'object_type_is_generic': object_type_is_generic_old, 'do_activate_global_pk2obj': do_activate_global_pk2obj_old, 'object_type_grants_read_access': object_type_grants_read_access_old})} # TODO: Consider is_returning @classmethod - def list(cls, api_session: APISession, system_old: str = None, gpk_list_old: list = None, name_list_old: list = None, is_log_dst_old: bool = None, is_log_src_old: bool = None, fetch_limit_old: int = None, is_lang_dst_old: bool = None, is_lang_src_old: bool = None, fetch_offset_old: int = None, is_otattr_dst_old: bool = None, is_otattr_src_old: bool = None, pg_cls_exists_old: bool = None, filter_params_dict_old: dict = None, object_type_fq_name_old: str = None, sorting_params_list_old: list = None, do_activate_global_pk2obj_old: bool = None, object_type_grants_read_access_old: bool = None) -> list: + def list(cls, api_session: APISession, system_old: str = None, gpk_list_old: list = None, name_list_old: list = None, is_log_dst_old: bool = None, is_log_src_old: bool = None, fetch_limit_old: int = None, is_lang_dst_old: bool = None, is_lang_src_old: bool = None, fetch_offset_old: int = None, is_otattr_dst_old: bool = None, is_otattr_src_old: bool = None, pg_cls_exists_old: bool = None, filter_params_dict_old: dict = None, object_type_fq_name_old: str = None, sorting_params_list_old: list = None, object_type_is_generic_old: bool = None, do_activate_global_pk2obj_old: bool = None, object_type_grants_read_access_old: bool = None) -> list: if system_old is not None and not (isinstance(system_old, str)): raise ValueError(f"'system' of incorrect type. Expected str, got {type(system_old)}") if gpk_list_old is not None and not (isinstance(gpk_list_old, list)): @@ -1456,18 +1465,20 @@ class Table(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 object_type_is_generic_old is not None and not (isinstance(object_type_is_generic_old, bool)): + raise ValueError(f"'object_type_is_generic' of incorrect type. Expected bool, got {type(object_type_is_generic_old)}") if do_activate_global_pk2obj_old is not None and not (isinstance(do_activate_global_pk2obj_old, bool)): raise ValueError(f"'do_activate_global_pk2obj' of incorrect type. Expected bool, got {type(do_activate_global_pk2obj_old)}") if object_type_grants_read_access_old is not None and not (isinstance(object_type_grants_read_access_old, bool)): raise ValueError(f"'object_type_grants_read_access' of incorrect type. Expected bool, got {type(object_type_grants_read_access_old)}") - res = api_session.session.post(api_session.base_url + '/wapi/transaction/execute', json=[cls.list_ta(system_old=system_old, gpk_list_old=gpk_list_old, name_list_old=name_list_old, is_log_dst_old=is_log_dst_old, is_log_src_old=is_log_src_old, fetch_limit_old=fetch_limit_old, is_lang_dst_old=is_lang_dst_old, is_lang_src_old=is_lang_src_old, fetch_offset_old=fetch_offset_old, is_otattr_dst_old=is_otattr_dst_old, is_otattr_src_old=is_otattr_src_old, pg_cls_exists_old=pg_cls_exists_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, do_activate_global_pk2obj_old=do_activate_global_pk2obj_old, object_type_grants_read_access_old=object_type_grants_read_access_old)]) + res = api_session.session.post(api_session.base_url + '/wapi/transaction/execute', json=[cls.list_ta(system_old=system_old, gpk_list_old=gpk_list_old, name_list_old=name_list_old, is_log_dst_old=is_log_dst_old, is_log_src_old=is_log_src_old, fetch_limit_old=fetch_limit_old, is_lang_dst_old=is_lang_dst_old, is_lang_src_old=is_lang_src_old, fetch_offset_old=fetch_offset_old, is_otattr_dst_old=is_otattr_dst_old, is_otattr_src_old=is_otattr_src_old, pg_cls_exists_old=pg_cls_exists_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, object_type_is_generic_old=object_type_is_generic_old, do_activate_global_pk2obj_old=do_activate_global_pk2obj_old, object_type_grants_read_access_old=object_type_grants_read_access_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(name_old: str, name_new: str = None, system_new: str = None, is_log_dst_new: bool = None, is_log_src_new: bool = None, is_lang_dst_new: bool = None, is_lang_src_new: bool = None, is_otattr_dst_new: bool = None, is_otattr_src_new: bool = None, content_gender_new: str = None, do_imp_from_dd_new: bool = None, object_type_name_new: str = None, do_imp_from_dd_upd_cols_new: bool = None, do_activate_global_pk2obj_new: bool = None, do_create_global_ref_params_new: bool = None, object_type_grants_read_access_new: bool = None, make_generic_object_type_permissions_new: bool = True) -> dict: + def update_ta(name_old: str, name_new: str = None, system_new: str = None, is_log_dst_new: bool = None, is_log_src_new: bool = None, is_lang_dst_new: bool = None, is_lang_src_new: bool = None, is_otattr_dst_new: bool = None, is_otattr_src_new: bool = None, content_gender_new: str = None, do_imp_from_dd_new: bool = None, object_type_name_new: str = None, object_type_is_generic_new: bool = None, do_imp_from_dd_upd_cols_new: bool = None, do_activate_global_pk2obj_new: bool = None, do_create_global_ref_params_new: bool = None, object_type_grants_read_access_new: bool = None, make_generic_object_type_permissions_new: bool = True) -> dict: if name_new is not None and not (isinstance(name_new, str)): raise ValueError(f"'name' of incorrect type. Expected str, got {type(name_new)}") if system_new is not None and not (isinstance(system_new, str)): @@ -1490,6 +1501,8 @@ class Table(APIObject): raise ValueError(f"'do_imp_from_dd' of incorrect type. Expected bool, got {type(do_imp_from_dd_new)}") if object_type_name_new is not None and not (isinstance(object_type_name_new, str)): raise ValueError(f"'object_type_name' of incorrect type. Expected str, got {type(object_type_name_new)}") + if object_type_is_generic_new is not None and not (isinstance(object_type_is_generic_new, bool)): + raise ValueError(f"'object_type_is_generic' of incorrect type. Expected bool, got {type(object_type_is_generic_new)}") if do_imp_from_dd_upd_cols_new is not None and not (isinstance(do_imp_from_dd_upd_cols_new, bool)): raise ValueError(f"'do_imp_from_dd_upd_cols' of incorrect type. Expected bool, got {type(do_imp_from_dd_upd_cols_new)}") if do_activate_global_pk2obj_new is not None and not (isinstance(do_activate_global_pk2obj_new, bool)): @@ -1503,11 +1516,11 @@ class Table(APIObject): if not (isinstance(name_old, str)): raise ValueError(f"'name' of incorrect type. Expected str, got {type(name_old)}") - return {'name': 'cntl.table.update', 'new': _denullify_dict({'name': name_new, 'system': system_new, 'is_log_dst': is_log_dst_new, 'is_log_src': is_log_src_new, 'is_lang_dst': is_lang_dst_new, 'is_lang_src': is_lang_src_new, 'is_otattr_dst': is_otattr_dst_new, 'is_otattr_src': is_otattr_src_new, 'content_gender': content_gender_new, 'do_imp_from_dd': do_imp_from_dd_new, 'object_type_name': object_type_name_new, 'do_imp_from_dd_upd_cols': do_imp_from_dd_upd_cols_new, 'do_activate_global_pk2obj': do_activate_global_pk2obj_new, 'do_create_global_ref_params': do_create_global_ref_params_new, 'object_type_grants_read_access': object_type_grants_read_access_new, 'make_generic_object_type_permissions': make_generic_object_type_permissions_new}), 'old': _denullify_dict({'name': name_old})} + return {'name': 'cntl.table.update', 'new': _denullify_dict({'name': name_new, 'system': system_new, 'is_log_dst': is_log_dst_new, 'is_log_src': is_log_src_new, 'is_lang_dst': is_lang_dst_new, 'is_lang_src': is_lang_src_new, 'is_otattr_dst': is_otattr_dst_new, 'is_otattr_src': is_otattr_src_new, 'content_gender': content_gender_new, 'do_imp_from_dd': do_imp_from_dd_new, 'object_type_name': object_type_name_new, 'object_type_is_generic': object_type_is_generic_new, 'do_imp_from_dd_upd_cols': do_imp_from_dd_upd_cols_new, 'do_activate_global_pk2obj': do_activate_global_pk2obj_new, 'do_create_global_ref_params': do_create_global_ref_params_new, 'object_type_grants_read_access': object_type_grants_read_access_new, 'make_generic_object_type_permissions': make_generic_object_type_permissions_new}), 'old': _denullify_dict({'name': name_old})} # TODO: Consider is_returning @classmethod - def update(cls, api_session: APISession, name_old: str, name_new: str = None, system_new: str = None, is_log_dst_new: bool = None, is_log_src_new: bool = None, is_lang_dst_new: bool = None, is_lang_src_new: bool = None, is_otattr_dst_new: bool = None, is_otattr_src_new: bool = None, content_gender_new: str = None, do_imp_from_dd_new: bool = None, object_type_name_new: str = None, do_imp_from_dd_upd_cols_new: bool = None, do_activate_global_pk2obj_new: bool = None, do_create_global_ref_params_new: bool = None, object_type_grants_read_access_new: bool = None, make_generic_object_type_permissions_new: bool = True) -> list: + def update(cls, api_session: APISession, name_old: str, name_new: str = None, system_new: str = None, is_log_dst_new: bool = None, is_log_src_new: bool = None, is_lang_dst_new: bool = None, is_lang_src_new: bool = None, is_otattr_dst_new: bool = None, is_otattr_src_new: bool = None, content_gender_new: str = None, do_imp_from_dd_new: bool = None, object_type_name_new: str = None, object_type_is_generic_new: bool = None, do_imp_from_dd_upd_cols_new: bool = None, do_activate_global_pk2obj_new: bool = None, do_create_global_ref_params_new: bool = None, object_type_grants_read_access_new: bool = None, make_generic_object_type_permissions_new: bool = True) -> list: if name_new is not None and not (isinstance(name_new, str)): raise ValueError(f"'name' of incorrect type. Expected str, got {type(name_new)}") if system_new is not None and not (isinstance(system_new, str)): @@ -1530,6 +1543,8 @@ class Table(APIObject): raise ValueError(f"'do_imp_from_dd' of incorrect type. Expected bool, got {type(do_imp_from_dd_new)}") if object_type_name_new is not None and not (isinstance(object_type_name_new, str)): raise ValueError(f"'object_type_name' of incorrect type. Expected str, got {type(object_type_name_new)}") + if object_type_is_generic_new is not None and not (isinstance(object_type_is_generic_new, bool)): + raise ValueError(f"'object_type_is_generic' of incorrect type. Expected bool, got {type(object_type_is_generic_new)}") if do_imp_from_dd_upd_cols_new is not None and not (isinstance(do_imp_from_dd_upd_cols_new, bool)): raise ValueError(f"'do_imp_from_dd_upd_cols' of incorrect type. Expected bool, got {type(do_imp_from_dd_upd_cols_new)}") if do_activate_global_pk2obj_new is not None and not (isinstance(do_activate_global_pk2obj_new, bool)): @@ -1543,7 +1558,7 @@ class Table(APIObject): if not (isinstance(name_old, str)): raise ValueError(f"'name' of incorrect type. Expected str, got {type(name_old)}") - res = api_session.session.post(api_session.base_url + '/wapi/transaction/execute', json=[cls.update_ta(name_new=name_new, system_new=system_new, is_log_dst_new=is_log_dst_new, is_log_src_new=is_log_src_new, is_lang_dst_new=is_lang_dst_new, is_lang_src_new=is_lang_src_new, is_otattr_dst_new=is_otattr_dst_new, is_otattr_src_new=is_otattr_src_new, content_gender_new=content_gender_new, do_imp_from_dd_new=do_imp_from_dd_new, object_type_name_new=object_type_name_new, do_imp_from_dd_upd_cols_new=do_imp_from_dd_upd_cols_new, do_activate_global_pk2obj_new=do_activate_global_pk2obj_new, do_create_global_ref_params_new=do_create_global_ref_params_new, object_type_grants_read_access_new=object_type_grants_read_access_new, make_generic_object_type_permissions_new=make_generic_object_type_permissions_new, name_old=name_old)]) + res = api_session.session.post(api_session.base_url + '/wapi/transaction/execute', json=[cls.update_ta(name_new=name_new, system_new=system_new, is_log_dst_new=is_log_dst_new, is_log_src_new=is_log_src_new, is_lang_dst_new=is_lang_dst_new, is_lang_src_new=is_lang_src_new, is_otattr_dst_new=is_otattr_dst_new, is_otattr_src_new=is_otattr_src_new, content_gender_new=content_gender_new, do_imp_from_dd_new=do_imp_from_dd_new, object_type_name_new=object_type_name_new, object_type_is_generic_new=object_type_is_generic_new, do_imp_from_dd_upd_cols_new=do_imp_from_dd_upd_cols_new, do_activate_global_pk2obj_new=do_activate_global_pk2obj_new, do_create_global_ref_params_new=do_create_global_ref_params_new, object_type_grants_read_access_new=object_type_grants_read_access_new, make_generic_object_type_permissions_new=make_generic_object_type_permissions_new, name_old=name_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/dns.py b/4.2/python/dns.py index b0d648fb49c877463883d60535adef5193ee41bc..b5bf92965706f34eaf3bec47baf928cb69e461a2 100644 --- a/4.2/python/dns.py +++ b/4.2/python/dns.py @@ -576,53 +576,23 @@ 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(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 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)}") - - 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, 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 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)}") - - 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_update_ta(cidr_new: str, cidr_old: str, is_dhcp_new: bool = None, is_reserved_new: bool = None) -> dict: + def bulk_update_ta(cidr_new: str, cidr_old: str) -> 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 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({'cidr': cidr_new, 'is_dhcp': is_dhcp_new, 'is_reserved': is_reserved_new}), 'old': _denullify_dict({'cidr': cidr_old})} + return {'name': 'dns.ip_addr.bulk_update', 'new': _denullify_dict({'cidr': cidr_new}), 'old': _denullify_dict({'cidr': cidr_old})} # TODO: Consider is_returning @classmethod - def bulk_update(cls, api_session: APISession, cidr_new: str, cidr_old: str, is_dhcp_new: bool = None, is_reserved_new: bool = None) -> list: + def bulk_update(cls, api_session: APISession, cidr_new: str, cidr_old: str) -> 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 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(cidr_new=cidr_new, is_dhcp_new=is_dhcp_new, is_reserved_new=is_reserved_new, cidr_old=cidr_old)]) + res = api_session.session.post(api_session.base_url + '/wapi/transaction/execute', json=[cls.bulk_update_ta(cidr_new=cidr_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]] diff --git a/4.2/version_numeric b/4.2/version_numeric index 88ea5ace533a75da943039a23061efc093c1deb9..ec87108d821a5ba83a1650f5418ed577397d7cdc 100644 --- a/4.2/version_numeric +++ b/4.2/version_numeric @@ -1 +1 @@ -4.2.9 \ No newline at end of file +4.2.3 \ No newline at end of file diff --git a/latest_version b/latest_version index 88ea5ace533a75da943039a23061efc093c1deb9..ec87108d821a5ba83a1650f5418ed577397d7cdc 100644 --- a/latest_version +++ b/latest_version @@ -1 +1 @@ -4.2.9 \ No newline at end of file +4.2.3 \ No newline at end of file