Skip to content
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

networkmanager returns null keys for some connections. #289

Open
dforste opened this issue Aug 30, 2023 · 2 comments
Open

networkmanager returns null keys for some connections. #289

dforste opened this issue Aug 30, 2023 · 2 comments

Comments

@dforste
Copy link
Contributor

dforste commented Aug 30, 2023

There are some cases where a connection is returned without a device attached.
Eg.

# nmcli -t connection show
System ens160:ea74cf24-c2a2-ecee-3747-a2d76d46f93b:802-3-ethernet:ens160
lo:04577901-581b-4cac-bb04-f015fe36274d:loopback:lo
ens160:5780e094-7abe-419a-9c3e-de716150898d:802-3-ethernet:

In this case the key is empty string. I suggest using the name as the ID and creating a device below it.

The current behavior:

# facter -p simplib__networkmanager.connection
{
     => {
      name => "ens160",
      type => "802-3-ethernet",
      uuid => "5780e094-7abe-419a-9c3e-de716150898d"
    },
    ens160 => {
      name => "System ens160",
      type => "802-3-ethernet",
      uuid => "ea74cf24-c2a2-ecee-3747-a2d76d46f93b"
    },
    lo => {
      name => "lo",
      type => "loopback",
      uuid => "04577901-581b-4cac-bb04-f015fe36274d"
    }
}

Proposed behavior:

# facter -p simplib__networkmanager.connection
{
    ens160 => {
      device => "",
      name => "ens160",
      type => "802-3-ethernet",
      uuid => "5780e094-7abe-419a-9c3e-de716150898d"
    },
    System ens160 => {
      device => "ens160",
      name => "System ens160",
      type => "802-3-ethernet",
      uuid => "ea74cf24-c2a2-ecee-3747-a2d76d46f93b"
    },
    lo => {
      device => "lo",
      name => "lo",
      type => "loopback",
      uuid => "04577901-581b-4cac-bb04-f015fe36274d"
    }
}
@op-ct op-ct added this to Org Triage Aug 30, 2023
@silug silug moved this from New to Todo in Org Triage Jan 11, 2024
@RamblingCookieMonster
Copy link

RamblingCookieMonster commented Dec 16, 2024

+1, as this issue is a bit dated. We have some folks who want to use a puppet module depending on this, and the resulting facts json makes a few downstream processes unhappy. We can deal, but, it seems less than optimal as is, using the name seems like a reasonable fallback.

@dforste
Copy link
Contributor Author

dforste commented Dec 23, 2024

#290

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

2 participants