CESNET / Netopeer-GUI

Graphical user interface for NETCONF client
MIT License
37 stars 9 forks source link

Unknown element "test-option" #99

Closed makramalla closed 7 years ago

makramalla commented 7 years ago

Hello,

I am trying to edit a config through the Netopeer-GUI but I receive the following error:

Unknown element "test-option".

All of the provided modules are parsed well with no issue and I am able to view most of the capabilities and information, but I am not able to edit any of the configs throughout the GUI due to the same error.

Let me know if you need any further information from my end.

Thank you for your help,

Maged

makramalla commented 7 years ago

Hello,

Just to elaborate more on that issue, according to my understanding (and correct me if I am wrong) this problem is caused by netopeer sending a "test-option" request. However the modules I am using do not support this option according to RFC 6241:

test-option: The element MAY be specified only if the device advertises the :validate:1.1 capability (Section 8.6).

Hope this helped a bit in clarifying the issue I am having. Let me know if you need any further information from my end.

Maged

alexadavid commented 7 years ago

Hello, could you send us the log of netopeergui (the part about edit-config) please? You can find it in /var/www/netopeer-gui/app/logs/prod.data.log

I went throught the code and netopeergui does not send any test-option now (it is possible to send test-option, but no part of gui set the value yet - https://github.com/CESNET/Netopeer-GUI/search?utf8=✓&q=test-option). Therefore, I think the problem should be in lower layers of the application. Maybe @michalvasko could help?

Test-option should have a default value set to testset (based on documentation https://github.com/CESNET/netopeerguid/blob/master/src/README.md#5-netconf-edit-config)

michalvasko commented 7 years ago

Hi, I think I may know where the problem is, but I cannot look into it right away. I will today, though.

Michal

michalvasko commented 7 years ago

Hi Maged, what do you mean the modules you are using do not support the option? edit-config is defined in ietf-netconf and is not affected by your additional modules. And how did you turn the feature validate off, did you use DISABLE_VALIDATION for netopeer-server compilation?

Regards, Michal

makramalla commented 7 years ago

Hello Michal,

Thank you for your help. I think I expressed myself incorrectly.

I meant that the device itself does not advertise the :validate1.1 capability, so accordingly Netopeer-GUI should not be sending sending test-option. (again, feel free to correct me if I am wrong).

Important note: I am currently not using a netopeer-server, I am using my own netconf server instead.

Let me know if these information are sufficient or if you need any further details or log files from my side.

Sorry again for the confusion and thanks for your help.

Maged

michalvasko commented 7 years ago

Hi Maged, it seems that libnetconf2 and netopeerguid work the way they should based on my tests, so that leaves netopeergui as the place to look for an issue. Unfortunately, its support is currently quite limited, so the fix may take a long time.

Regards, Michal

cejkato2 commented 7 years ago

I'm quite surprised because the old file system hierarchy has changed a lot since I saw the project last time...

However, if the issue is about test-option, could you please have a look at this line: https://github.com/CESNET/Netopeer-GUI/blob/master/src/FIT/NetopeerBundle/Services/Functionality/NetconfFunctionality.php#L559

Maybe some workaround for testing (like manual setting of your prefered value) can help to create a patch. I remember that the options were passed from php into backend using a code similar to this one...

michalvasko commented 7 years ago

So I made a change in netopeerguid and now it skips any data it does not know (which should also be this test-option) even though netopeer-gui should be the place to check what the server supports and what not. Please try it again.

Regards, Michal

makramalla commented 7 years ago

Hello Michal,

Thanks for your help in that.

However I still receive the same error: Jan 12 14:24:46 netopeergui-jan12 netopeerguid: lib ERROR: Unknown element "test-option" Jan 12 14:24:46 netopeergui-jan12 netopeerguid: error calback: empty error list

Let me know if you need any other log files or if I can help in any way.

Thanks again,

Maged

michalvasko commented 7 years ago

Hi Maged, please try it again now.

Regards, Michal