IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
As part of the effort to seperate provider specific logic from generic
applier setup flow, the configuration preparation for adding and editing
interfaces has been relocated from netapplier to nm.applier module.
Signed-off-by: Edward Haas <edwardh@redhat.com>
Code that used to depend on nmclient has been relocated to nm.device.
Only a client 'refresh' has been left in netapplier, target for removal
when the mainloop is integrated in the setup flow.
Signed-off-by: Edward Haas <edwardh@redhat.com>
With the aim to decouple main infrastructure code from the specific
NM provider, netinfo module has been refactored.
The code has been split into 3 main parts:
- Collection of data is performed from the netinfo module, controlling
which data is collected.
- nm.* (excluding the translator) is responsible to provide raw NM
information, collected from NM.
- nm.translator is responsible for the translation of the NM info to the
nmstate schema format (and vice versa).
As a general rule, only the nm provider package should depend on NM.
Signed-off-by: Edward Haas <edwardh@redhat.com>
When the iface properties are changed, an activate command should be
executed. Therefore, if the iface admin state is up, we will always
execute an activate on them.
Slaves can now be defined for a bond.
Note that in the nmstate schema, slaves are specified under the bond
interface while NM expects each slave to be marked as "slave".
In order to adjust, the desired state is normalized with slaves metadata
in the form of an internal property "master" which takes the value of
the bond master.
Interfaces configuration is now editable.
Checked against the bond type, other types may require special handling
and should be checked when support for them is introduced.
The desired state may only specify partial configuration and it is up to
nmstate to add the missing parts.
In this patch, the requested desired state is merged into the reported
interfaces state.
The bond interface type is now supported through the reports.
It is introduced with a new nm (networkmanager) package which will act
as the NM provider, linking between the nmstate business logic and the
nm api.
This is required to be able to have a chance to see changes after
applying a new state:
```python
previous_state = netinfo.show()
netapplier.apply(state)
import time; time.sleep(10)
current_state = netinfo.show()
```
Without this, `current_state` and `previous_state` will be the same as
long as `netapplier.apply()` does not run `GLib.MainLoop`.
Use 'nmstatectl show' to show the network state.
Current (libnmstate) inplementation includes only listing the interfaces
with basic properties of each.
The netinfo module is used to list all existing interfaces on the
machine with basic properties (name, type, state).
The unit tests required the introduction of the compat module which
imports the mock package for Python2 and uses the standard lib mock from
Python3.
The requirements.txt file is not being processed correctly when
specified as a relative path in the tox.ini configuration.
Using toxinidir to solve the problem.
Note that the ethernet specific properties should be moved to a seperate
schema file when the python-jsonschema will support relative path
referencing.
A basic schema is introduced, defined in json-schema[1] and implemented
by jsonschema[2] python implementation.
The full/partial definition for the nmstate schema will be introduced in
a seperate patch.
[1] http://json-schema.org
[2] https://github.com/Julian/jsonschema