canonical / canonical/python-libmaas

Please support creating openvswitch bridges

Abierto
#295 2 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Python
Estrellas
65
Forks
71
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

From the MaaS UI, we can create openvswitch bridges. However, we can not from python-libmaas.

I am using python-libmaas from master of this git repo, dated 2023-10-23, commit `fec3b5023f9d618ba61e9d9108a345300216d8c3`.

Example:

```
>>> machine.interfaces.create(maas.client.enum.InterfaceType.BRIDGE, name='br0', parent=interface, bridge_type='ovs')
Traceback (most recent call last):
File "", line 1, in
File "/Users/nu/venvs/maas-api/lib/python3.11/site-packages/maas/client/utils/maas_async.py", line 43, in wrapper
result = eventloop.run_until_complete(result)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.11/3.11.6/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/Users/nu/venvs/maas-api/lib/python3.11/site-packages/maas/client/viscera/__init__.py", line 498, in _create
new_obj = await super_cls.create(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/nu/venvs/maas-api/lib/python3.11/site-packages/maas/client/utils/maas_async.py", line 40, in wrapper
result = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
TypeError: InterfacesType.create() got an unexpected keyword argument 'bridge_type'
```

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Start at the machine.interfaces.create entry point and InterfacesType.create named in the traceback; trace how interface-creation arguments are handled and compare the supported bridge options. Done means the example call accepts bridge_type='ovs' without the reported TypeError and can create an Open vSwitch bridge.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
python
Área
api, networking
Tipo de issue
Nueva funcionalidad
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
45/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.