-
-
Notifications
You must be signed in to change notification settings - Fork 653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Systems: Re-enable the modify_interface call #2921
Conversation
@holmesb Please confirm that this is working if you have the time. |
Saving returns true now, but system still lacks the interface I'm adding:
But only interface is default, not eth0:
Same in v3.2.2 works fine:
|
@holmesb Do you have on 3.2.2 also the interface "default"? Depending on that I could correct the fix. |
No, only eth0 |
b2606de
to
0d9df4d
Compare
@holmesb Oh okay that is a bug too in my eyes. However I found my logic error. I hope that the new version of the commit fixes the behavior now. I will create a test. |
Codecov Report
@@ Coverage Diff @@
## master #2921 +/- ##
==========================================
- Coverage 46.96% 46.76% -0.21%
==========================================
Files 101 100 -1
Lines 14459 14447 -12
==========================================
- Hits 6791 6756 -35
- Misses 7668 7691 +23
Continue to review full report at Codecov.
|
0d9df4d
to
c6faf93
Compare
Last force push. I promise! This time we have it confirmed via the test that our usecase is working. |
Yes that's fixed. Both default and eth0 interfaces present. Amazing @SchoolGuy! :-) :-) :-) |
Now it is down to my fellow colleagues to rate if they find the code acceptable! :) |
Looks like
But system still has eth0 attached |
@holmesb Thanks. Will have a look tomorrow or Monday. |
@holmesb Had a look at the logic. It seems that |
c6faf93
to
5bdda71
Compare
I will not be able to fix this today due to some unforeseen events. I will definitely have time tomorrow though. |
This reintroduces modify_interface to the System object. It is a compatibility function. The way to do this now is: system.interfaces[<name>].property = value The old way was: system.modify_interface({"property-<name>": value}) However since the new way is not yet supported by all consumers of the API this compatibility layer. This commit as well reintroduces "rename_interface". The usage didn't change for XML-RPC API consumers, however it does for Python API users. An example for XML-RPC: remote.modify_system( system, "rename_interface", {"interface": "eth0", "rename_interface": "eth_new"}, token, ) Lastly this commit also reintroduces "delete_interface". The usage didn't change for XML-RPC API users but it did for Python API users. An example for the XML-RPC can be viewed below: remote.modify_system( system, "delete_interface", {"interface": "eth0"}, token )
5bdda71
to
b10a4be
Compare
@holmesb Should all be fine now. If time permits please give feedback. The commit message should be extensive enough to explain what my commit does. If not feel free to ask. |
bb02bc3
to
849c75f
Compare
849c75f
to
50a6d3f
Compare
delete_interface working fine now. Am I right to say rename_interface should look like:
|
@holmesb Nope. Look at the commit message. You need something like this: remote.modify_system(
system_id,
'rename_interface',
{"interface" : "eth0", "rename_interface" : "eth1"},
token
) |
Ah cool, yes working too. Nice work. |
Since noone is objecting and this is reportedly working as expected now, I will merge this one with my Admin rights. |
This reintroduces modify_interface to the System object. It is a
compatibility function. The way to do this now is:
The old way was:
However since the new way is not yet supported by all consumers of
the API this compatibility layer.
This fixes #2846, #2896