diff --git a/lib/Deprecated.js b/lib/Deprecated.js index 12f7f0f7..de0832cf 100644 --- a/lib/Deprecated.js +++ b/lib/Deprecated.js @@ -796,7 +796,6 @@ class iNetwork { DNS_listening_port: data[27]._, Host_name: data[28]._, Domain_name: data[29]._, - Reserved: data[30]._, Domain_search_list: data[31]._, }; } else { rtValue = str; } @@ -1217,17 +1216,13 @@ class iObj { Adopted_data_update: data[21]._, Adopted_data_delete: data[22]._, Adopted_data_execute: data[23]._, - Reserved: data[24]._, Adopted_object_alter: data[25]._, Adopted_object_reference: data[26]._, - // Reserved: data[27]._, // TODO: duplicate key Data_execute: data[28]._, - // Reserved: data[29]._, // TODO: duplicate key Object_alter: data[30]._, Object_reference: data[31]._, ASP_device_name_of_library: data[32]._, ASP_device_name_of_object: data[33]._, - // Reserved: data[34]._, // TODO: duplicate key Offset_to_group_information_table: data[35]._, Number_of_group_table_entries_returned: data[36]._, }; @@ -1530,7 +1525,6 @@ class iObj { Text_description: data[17]._, Type_of_program: data[18]._, 'Teraspace_storage-enabled_program': data[19]._, - Reserved: data[20]._, Minimum_number_of_parameters: data[21]._, Maximum_number_of_parameters: data[22]._, Program_size: data[23]._, @@ -1548,13 +1542,11 @@ class iObj { Program_domain: data[35]._, Conversion_required: data[36]._, Conversion_details: data[37]._, - // Reserved: data[38]._, // TODO: duplicate Optimization: data[39]._, Paging_pool: data[40]._, 'Update_program_automatic_storage_area_(PASA)': data[41]._, 'Clear_program_automatic_storage_area_(PASA)': data[42]._, Paging_amount: data[43]._, - // Reserved: data[38]._, // TODO: duplicate Program_entry_procedure_module: data[45]._, Program_entry_procedure_module_library: data[46]._, Activation_group_attribute: data[47]._, @@ -1715,7 +1707,6 @@ class iObj { Teraspace_storage_enabled_modules: data[26]._, Storage_model: data[27]._, 'Uses_argument_optimization_(ARGOPT)': data[28]._, - "Reserved_'00'X": data[29]._, Service_program_state: data[30]._, Service_program_domain: data[31]._, Associated_space_size: data[32]._, @@ -1728,7 +1719,6 @@ class iObj { Conversion_required: data[39]._, All_creation_data: data[40]._, Conversion_details: data[41]._, - Reserved: data[42]._, Paging_pool: data[43]._, Paging_amount: data[44]._, }; @@ -1808,12 +1798,10 @@ class iObj { rtValue = { User_profile_name: data[2]._, 'Previous_sign-on_date_and_time': data[3]._, - // Reserved: data[4]._, // TODO: This is a duplicate 'Sign-on_attempts_not_valid': data[5]._, Status: data[6]._, Password_change_date: data[7]._, No_password_indicator: data[8]._, - Reserved: data[9]._, Password_expiration_interval: data[10]._, Date_password_expires: data[11]._, Days_until_password_expires: data[12]._, @@ -1924,7 +1912,6 @@ class iObj { Object_existence: data[5]._, Object_alter: data[6]._, Object_reference: data[7]._, - Reserved: data[8]._, Object_operational: data[9]._, Data_read: data[10]._, Data_add: data[11]._, @@ -2116,7 +2103,6 @@ class iProd { Server_IPL_required: data[29]._, Creation_date_and_time: data[30]._, Technology_refresh_PTF: data[31]._, - Reserved: data[32]._, }; } else { rtValue = str; } @@ -2232,7 +2218,6 @@ class iProd { const { data } = result.myscript.pgm[0].parm[0].ds[0]; rtValue = { - // Reserved: data[2]._, // TODO: Duplicate key Product_ID: data[3]._, Release_level: data[4]._, Product_option: data[5]._, @@ -2244,14 +2229,12 @@ class iProd { Supported_flag: data[11]._, Registration_type: data[12]._, Registration_value: data[13]._, - // Reserved: data[14]._, // TODO: Duplicate key Offset_to_additional_information: data[15]._, Primary_language_load_identifier: data[16]._, Minimum_target_release: data[17]._, 'Minimum_VRM_of_*BASE_required_by_option': data[18]._, Requirements_met_between_base_and_option_value: data[19]._, Level: data[20]._, - Reserved: data[21]._, }; } else { rtValue = str; } @@ -2767,8 +2750,14 @@ class iWork { return false; })); - // TODO: Throw error - if (keyValid === false) { return; } + if (keyValid === false) { + if (this.reportError) { + cb(new Error(`Invalid System value: ${sysValue}`), null); + return; + } + cb(null); + return; + } let item; if (type === '10i0') { item = { type: '10i0', value: 0 }; } else { item = { type, value: '' }; } @@ -3398,8 +3387,6 @@ const xmlToJson = (xml) => { const rtDataRegG = /[\s\S]*?<\/data>/g; const rtDataReg = /([\s\S]*?)<\/data>/; - // const dsRegG = /[\s\S]+?<\/ds>/g; // TODO: Not used - // const dsReg = /([\s\S]+?)<\/ds>/; // TODO: Not used const dataRegG = //g; const dataReg = /([\s\S]*?)<\/data>/; const sqlResultG = /[\s\S]+?<\/row>/g; diff --git a/test/functional/deprecated/iNetworkFunctional.js b/test/functional/deprecated/iNetworkFunctional.js index 2c96f3f3..10d813f3 100644 --- a/test/functional/deprecated/iNetworkFunctional.js +++ b/test/functional/deprecated/iNetworkFunctional.js @@ -92,7 +92,6 @@ describe('iNetwork Functional Tests', () => { expect(output).to.have.a.property('DNS_listening_port'); expect(output).to.have.a.property('Host_name'); expect(output).to.have.a.property('Domain_name'); - expect(output).to.have.a.property('Reserved'); expect(output).to.have.a.property('Domain_search_list'); done(); }); diff --git a/test/functional/deprecated/iObjFunctional.js b/test/functional/deprecated/iObjFunctional.js index ef184b98..c998a647 100644 --- a/test/functional/deprecated/iObjFunctional.js +++ b/test/functional/deprecated/iObjFunctional.js @@ -86,17 +86,13 @@ describe('iObj Functional Tests', () => { expect(output).to.have.a.property('Adopted_data_update'); expect(output).to.have.a.property('Adopted_data_delete'); expect(output).to.have.a.property('Adopted_data_execute'); - expect(output).to.have.a.property('Reserved'); expect(output).to.have.a.property('Adopted_object_alter'); expect(output).to.have.a.property('Adopted_object_reference'); - expect(output).to.have.a.property('Reserved'); expect(output).to.have.a.property('Data_execute'); - expect(output).to.have.a.property('Reserved'); expect(output).to.have.a.property('Object_alter'); expect(output).to.have.a.property('Object_reference'); expect(output).to.have.a.property('ASP_device_name_of_library'); expect(output).to.have.a.property('ASP_device_name_of_object'); - expect(output).to.have.a.property('Reserved'); expect(output).to.have.a.property('Offset_to_group_information_table'); expect(output).to.have.a.property('Number_of_group_table_entries_returned'); done(); @@ -182,7 +178,6 @@ describe('iObj Functional Tests', () => { expect(output).to.have.a.property('Text_description'); expect(output).to.have.a.property('Type_of_program'); expect(output).to.have.a.property('Teraspace_storage-enabled_program'); - expect(output).to.have.a.property('Reserved'); expect(output).to.have.a.property('Minimum_number_of_parameters'); expect(output).to.have.a.property('Maximum_number_of_parameters'); expect(output).to.have.a.property('Program_size'); @@ -200,13 +195,11 @@ describe('iObj Functional Tests', () => { expect(output).to.have.a.property('Program_domain'); expect(output).to.have.a.property('Conversion_required'); expect(output).to.have.a.property('Conversion_details'); - expect(output).to.have.a.property('Reserved'); expect(output).to.have.a.property('Optimization'); expect(output).to.have.a.property('Paging_pool'); expect(output).to.have.a.property('Update_program_automatic_storage_area_(PASA)'); expect(output).to.have.a.property('Clear_program_automatic_storage_area_(PASA)'); expect(output).to.have.a.property('Paging_amount'); - expect(output).to.have.a.property('Reserved'); expect(output).to.have.a.property('Program_entry_procedure_module'); expect(output).to.have.a.property('Program_entry_procedure_module_library'); expect(output).to.have.a.property('Activation_group_attribute'); @@ -269,7 +262,6 @@ describe('iObj Functional Tests', () => { expect(output).to.have.a.property('Teraspace_storage_enabled_modules'); expect(output).to.have.a.property('Storage_model'); expect(output).to.have.a.property('Uses_argument_optimization_(ARGOPT)'); - expect(output).to.have.a.property('Reserved_\'00\'X'); expect(output).to.have.a.property('Service_program_state'); expect(output).to.have.a.property('Service_program_domain'); expect(output).to.have.a.property('Associated_space_size'); @@ -282,7 +274,6 @@ describe('iObj Functional Tests', () => { expect(output).to.have.a.property('Conversion_required'); expect(output).to.have.a.property('All_creation_data'); expect(output).to.have.a.property('Conversion_details'); - expect(output).to.have.a.property('Reserved'); expect(output).to.have.a.property('Paging_pool'); expect(output).to.have.a.property('Paging_amount'); done(); @@ -300,12 +291,10 @@ describe('iObj Functional Tests', () => { expect(output).to.be.an('Object'); expect(output).to.have.a.property('User_profile_name'); expect(output).to.have.a.property('Previous_sign-on_date_and_time'); - expect(output).to.have.a.property('Reserved'); expect(output).to.have.a.property('Sign-on_attempts_not_valid'); expect(output).to.have.a.property('Status'); expect(output).to.have.a.property('Password_change_date'); expect(output).to.have.a.property('No_password_indicator'); - expect(output).to.have.a.property('Reserved'); expect(output).to.have.a.property('Password_expiration_interval'); expect(output).to.have.a.property('Date_password_expires'); expect(output).to.have.a.property('Days_until_password_expires'); @@ -334,7 +323,6 @@ describe('iObj Functional Tests', () => { expect(output).to.have.a.property('Object_existence'); expect(output).to.have.a.property('Object_alter'); expect(output).to.have.a.property('Object_reference'); - expect(output).to.have.a.property('Reserved'); expect(output).to.have.a.property('Object_operational'); expect(output).to.have.a.property('Data_read'); expect(output).to.have.a.property('Data_add'); diff --git a/test/functional/deprecated/iProdFunctional.js b/test/functional/deprecated/iProdFunctional.js index d3a38c61..5a2d7b39 100644 --- a/test/functional/deprecated/iProdFunctional.js +++ b/test/functional/deprecated/iProdFunctional.js @@ -93,7 +93,6 @@ describe('iProd Functional Tests', () => { expect(ptf).to.have.a.property('Server_IPL_required'); expect(ptf).to.have.a.property('Creation_date_and_time'); expect(ptf).to.have.a.property('Technology_refresh_PTF'); - expect(ptf).to.have.a.property('Reserved'); done(); }); }); @@ -107,7 +106,6 @@ describe('iProd Functional Tests', () => { prod.getProductInfo('5770DG1', (product) => { expect(product).to.be.an('Object'); - expect(product).to.have.a.property('Reserved'); expect(product).to.have.a.property('Product_ID'); expect(product).to.have.a.property('Release_level'); expect(product).to.have.a.property('Product_option'); diff --git a/test/functional/iNetworkFunctional.js b/test/functional/iNetworkFunctional.js index 702b8e1d..95de68fc 100644 --- a/test/functional/iNetworkFunctional.js +++ b/test/functional/iNetworkFunctional.js @@ -65,7 +65,6 @@ describe('iNetwork Functional Tests', () => { expect(output).to.have.a.property('DNS_listening_port'); expect(output).to.have.a.property('Host_name'); expect(output).to.have.a.property('Domain_name'); - expect(output).to.have.a.property('Reserved'); expect(output).to.have.a.property('Domain_search_list'); done(); }); diff --git a/test/functional/iObjFunctional.js b/test/functional/iObjFunctional.js index 5926cd59..a9cc64db 100644 --- a/test/functional/iObjFunctional.js +++ b/test/functional/iObjFunctional.js @@ -58,17 +58,13 @@ describe('iObj Functional Tests', () => { expect(output).to.have.a.property('Adopted_data_update'); expect(output).to.have.a.property('Adopted_data_delete'); expect(output).to.have.a.property('Adopted_data_execute'); - expect(output).to.have.a.property('Reserved'); expect(output).to.have.a.property('Adopted_object_alter'); expect(output).to.have.a.property('Adopted_object_reference'); - expect(output).to.have.a.property('Reserved'); expect(output).to.have.a.property('Data_execute'); - expect(output).to.have.a.property('Reserved'); expect(output).to.have.a.property('Object_alter'); expect(output).to.have.a.property('Object_reference'); expect(output).to.have.a.property('ASP_device_name_of_library'); expect(output).to.have.a.property('ASP_device_name_of_object'); - expect(output).to.have.a.property('Reserved'); expect(output).to.have.a.property('Offset_to_group_information_table'); expect(output).to.have.a.property('Number_of_group_table_entries_returned'); done(); @@ -156,7 +152,6 @@ describe('iObj Functional Tests', () => { expect(output).to.have.a.property('Text_description'); expect(output).to.have.a.property('Type_of_program'); expect(output).to.have.a.property('Teraspace_storage-enabled_program'); - expect(output).to.have.a.property('Reserved'); expect(output).to.have.a.property('Minimum_number_of_parameters'); expect(output).to.have.a.property('Maximum_number_of_parameters'); expect(output).to.have.a.property('Program_size'); @@ -174,13 +169,11 @@ describe('iObj Functional Tests', () => { expect(output).to.have.a.property('Program_domain'); expect(output).to.have.a.property('Conversion_required'); expect(output).to.have.a.property('Conversion_details'); - expect(output).to.have.a.property('Reserved'); expect(output).to.have.a.property('Optimization'); expect(output).to.have.a.property('Paging_pool'); expect(output).to.have.a.property('Update_program_automatic_storage_area_(PASA)'); expect(output).to.have.a.property('Clear_program_automatic_storage_area_(PASA)'); expect(output).to.have.a.property('Paging_amount'); - expect(output).to.have.a.property('Reserved'); expect(output).to.have.a.property('Program_entry_procedure_module'); expect(output).to.have.a.property('Program_entry_procedure_module_library'); expect(output).to.have.a.property('Activation_group_attribute'); @@ -244,7 +237,6 @@ describe('iObj Functional Tests', () => { expect(output).to.have.a.property('Teraspace_storage_enabled_modules'); expect(output).to.have.a.property('Storage_model'); expect(output).to.have.a.property('Uses_argument_optimization_(ARGOPT)'); - expect(output).to.have.a.property('Reserved_\'00\'X'); expect(output).to.have.a.property('Service_program_state'); expect(output).to.have.a.property('Service_program_domain'); expect(output).to.have.a.property('Associated_space_size'); @@ -257,7 +249,6 @@ describe('iObj Functional Tests', () => { expect(output).to.have.a.property('Conversion_required'); expect(output).to.have.a.property('All_creation_data'); expect(output).to.have.a.property('Conversion_details'); - expect(output).to.have.a.property('Reserved'); expect(output).to.have.a.property('Paging_pool'); expect(output).to.have.a.property('Paging_amount'); done(); @@ -276,12 +267,10 @@ describe('iObj Functional Tests', () => { expect(output).to.be.an('Object'); expect(output).to.have.a.property('User_profile_name'); expect(output).to.have.a.property('Previous_sign-on_date_and_time'); - expect(output).to.have.a.property('Reserved'); expect(output).to.have.a.property('Sign-on_attempts_not_valid'); expect(output).to.have.a.property('Status'); expect(output).to.have.a.property('Password_change_date'); expect(output).to.have.a.property('No_password_indicator'); - expect(output).to.have.a.property('Reserved'); expect(output).to.have.a.property('Password_expiration_interval'); expect(output).to.have.a.property('Date_password_expires'); expect(output).to.have.a.property('Days_until_password_expires'); @@ -311,7 +300,6 @@ describe('iObj Functional Tests', () => { expect(output).to.have.a.property('Object_existence'); expect(output).to.have.a.property('Object_alter'); expect(output).to.have.a.property('Object_reference'); - expect(output).to.have.a.property('Reserved'); expect(output).to.have.a.property('Object_operational'); expect(output).to.have.a.property('Data_read'); expect(output).to.have.a.property('Data_add'); diff --git a/test/functional/iProdFunctional.js b/test/functional/iProdFunctional.js index 3491e938..b0a8d186 100644 --- a/test/functional/iProdFunctional.js +++ b/test/functional/iProdFunctional.js @@ -65,7 +65,6 @@ describe('iProd Functional Tests', () => { expect(ptf).to.have.a.property('Server_IPL_required'); expect(ptf).to.have.a.property('Creation_date_and_time'); expect(ptf).to.have.a.property('Technology_refresh_PTF'); - expect(ptf).to.have.a.property('Reserved'); done(); }); }); @@ -80,7 +79,6 @@ describe('iProd Functional Tests', () => { prod.getProductInfo('5770DG1', (error, product) => { expect(error).to.equal(null); expect(product).to.be.an('Object'); - expect(product).to.have.a.property('Reserved'); expect(product).to.have.a.property('Product_ID'); expect(product).to.have.a.property('Release_level'); expect(product).to.have.a.property('Product_option'); diff --git a/test/functional/iWorkFunctional.js b/test/functional/iWorkFunctional.js index 29d25414..a69c67f9 100644 --- a/test/functional/iWorkFunctional.js +++ b/test/functional/iWorkFunctional.js @@ -40,6 +40,17 @@ describe('iWork Functional Tests', () => { done(); }); }); + + it('returns an error when the specified system value is invalid', (done) => { + const connection = new Connection(config); + + const work = new iWork(connection); + + work.getSysValue('invalid', (error) => { + expect(error).to.be.a('error'); + done(); + }); + }); }); describe('getSysStatus', () => {