mirror of
https://github.com/containers/podman.git
synced 2025-06-20 09:03:43 +08:00
Add rootful status to machine inspect
Podman machine inspect now shows if the machine is rootful Signed-off-by: Ashley Cui <acui@redhat.com>
This commit is contained in:
@ -24,7 +24,7 @@ Rootless only.
|
||||
Print results with a Go template.
|
||||
|
||||
| **Placeholder** | **Description** |
|
||||
| ------------------- | ----------------------------------------------------- |
|
||||
| ------------------- | --------------------------------------------------------------------- |
|
||||
| .ConfigPath ... | Machine configuration file location |
|
||||
| .ConnectionInfo ... | Machine connection information |
|
||||
| .Created | Machine creation time (string, ISO3601) |
|
||||
@ -32,6 +32,7 @@ Print results with a Go template.
|
||||
| .LastUp | Time when machine was last booted |
|
||||
| .Name | Name of the machine |
|
||||
| .Resources ... | Resources used by the machine |
|
||||
| .Rootful | Whether the machine prefers rootful or rootless container execution |
|
||||
| .SSHConfig ... | SSH configuration info for communitating with machine |
|
||||
| .State ... | Machine state |
|
||||
| .UserModeNetworking | Whether this machine uses user-mode networking |
|
||||
|
@ -317,6 +317,7 @@ func (m *MacMachine) Inspect() (*machine.InspectInfo, error) {
|
||||
},
|
||||
SSHConfig: m.SSHConfig,
|
||||
State: vmState,
|
||||
Rootful: m.Rootful,
|
||||
}
|
||||
return &ii, nil
|
||||
}
|
||||
|
@ -151,6 +151,7 @@ type InspectInfo struct {
|
||||
SSHConfig SSHConfig
|
||||
State Status
|
||||
UserModeNetworking bool
|
||||
Rootful bool
|
||||
}
|
||||
|
||||
func (rc RemoteConnectionType) MakeSSHURL(host, path, port, userName string) url.URL {
|
||||
|
@ -303,6 +303,7 @@ func (m *HyperVMachine) Inspect() (*machine.InspectInfo, error) {
|
||||
},
|
||||
SSHConfig: m.SSHConfig,
|
||||
State: vm.State().String(),
|
||||
Rootful: m.Rootful,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
@ -1596,6 +1596,7 @@ func (v *MachineVM) Inspect() (*machine.InspectInfo, error) {
|
||||
SSHConfig: v.SSHConfig,
|
||||
State: state,
|
||||
UserModeNetworking: true, // always true
|
||||
Rootful: v.Rootful,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
@ -1745,6 +1745,7 @@ func (v *MachineVM) Inspect() (*machine.InspectInfo, error) {
|
||||
SSHConfig: v.SSHConfig,
|
||||
State: state,
|
||||
UserModeNetworking: v.UserModeNetworking,
|
||||
Rootful: v.Rootful,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user