Title: Adding a macvlan interface · python-sdbus/python-sdbus-networkmanager · Discussion #71 · GitHub
Open Graph Title: Adding a macvlan interface · python-sdbus/python-sdbus-networkmanager · Discussion #71
X Title: Adding a macvlan interface · python-sdbus/python-sdbus-networkmanager · Discussion #71
Description: Adding a macvlan interface
Open Graph Description: I'm trying to do the equivalent of nmcli connection add ifname test type macvlan dev eth0 mode vepa It appears I want to use NetworkManager().add_and_activate(), but then what is the specific_objec...
X Description: I'm trying to do the equivalent of nmcli connection add ifname test type macvlan dev eth0 mode vepa It appears I want to use NetworkManager().add_and_activate(), but then what is the specific_o...
Opengraph URL: https://github.com/python-sdbus/python-sdbus-networkmanager/discussions/71
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"QAPage","mainEntity":{"@type":"Question","name":"Adding a macvlan interface","text":"I'm trying to do the equivalent of nmcli connection add ifname test type macvlan dev eth0 mode vepa
\nIt appears I want to use NetworkManager().add_and_activate(), but then what is the specific_object argument? Is it the Device, and I have to create the Device separately from the Connection? It's supposedly a str, but it's not the path to the device (which gives me src/sdbus/sd_bus_internals_message.c Line: 217. sd_bus_message_append_basic(parser_state->message, basic_type, char_ptr_to_append) in function _parse_basic returned error number: 22)
\nIncidentally, if you omit specific_object, you get the unhelpful TypeError: Could not flatten the args rather than anything indicating a missing argument.
","upvoteCount":1,"answerCount":3,"acceptedAnswer":{"@type":"Answer","text":"Hello @auspex
\nWhat exactly are you trying to call add_and_activate_connection with? It is probably not a correct type.
\nSee examples that add new connections like add-openvpn-connection-async.py. The important part is connection_type=ConnectionType.VPN.value that you want to swap to macvlan and vpn=VpnSettings that you want to swap for macvlan=MacvlanSettings(....
\nI highly recommend running the type checker like mypy as it will tell you when you call something with wrong types.
","upvoteCount":1,"url":"https://github.com/python-sdbus/python-sdbus-networkmanager/discussions/71#discussioncomment-12859978"}}}
| route-pattern | /_view_fragments/Voltron::DiscussionsFragmentsController/show/:user_id/:repository/:discussion_number/discussion_layout(.:format) |
| route-controller | voltron_discussions_fragments |
| route-action | discussion_layout |
| fetch-nonce | v2:ba8b5ea8-a89e-6b21-7553-213364a0c733 |
| current-catalog-service-hash | 9f0abe34da433c9b6db74bffa2466494a717b579a96b30a5d252e5090baea7be |
| request-id | B3CC:335F37:239281:30877A:698D84E5 |
| html-safe-nonce | 418829be6248d80e4014dd9201a41788886c6a5c336d0b903210b5aed016c55f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCM0NDOjMzNUYzNzoyMzkyODE6MzA4NzdBOjY5OEQ4NEU1IiwidmlzaXRvcl9pZCI6IjgyOTQxODQzODI3MTg5MDM1MjUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 042e5ce7a713b3d033ce642c95df16cd8a65178aff58da57ffcde4b6c729d3a4 |
| hovercard-subject-tag | discussion:8211305 |
| github-keyboard-shortcuts | repository,network-graph,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/Voltron::DiscussionsFragmentsController/show/python-sdbus/python-sdbus-networkmanager/71/discussion_layout |
| twitter:image | https://opengraph.githubassets.com/0b079b324234ca71ffa6754c12815caea9963d2ede7b71221f961fed70de4e0d/python-sdbus/python-sdbus-networkmanager/discussions/71 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0b079b324234ca71ffa6754c12815caea9963d2ede7b71221f961fed70de4e0d/python-sdbus/python-sdbus-networkmanager/discussions/71 |
| og:image:alt | I'm trying to do the equivalent of nmcli connection add ifname test type macvlan dev eth0 mode vepa It appears I want to use NetworkManager().add_and_activate(), but then what is the specific_objec... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | c0818105fa276287e9369cfdefa0a0fa7953719791ceff9b94d69623c0a4fe8a |
| turbo-cache-control | no-preview |
| go-import | github.com/python-sdbus/python-sdbus-networkmanager git https://github.com/python-sdbus/python-sdbus-networkmanager.git |
| octolytics-dimension-user_id | 88226657 |
| octolytics-dimension-user_login | python-sdbus |
| octolytics-dimension-repository_id | 384529652 |
| octolytics-dimension-repository_nwo | python-sdbus/python-sdbus-networkmanager |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 384529652 |
| octolytics-dimension-repository_network_root_nwo | python-sdbus/python-sdbus-networkmanager |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4c8f4bd0b67d7f1472d0ab3f49827eaae062a36b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width