mirror of
https://github.com/containers/podman.git
synced 2025-06-20 17:13: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.
|
Print results with a Go template.
|
||||||
|
|
||||||
| **Placeholder** | **Description** |
|
| **Placeholder** | **Description** |
|
||||||
| ------------------- | ----------------------------------------------------- |
|
| ------------------- | --------------------------------------------------------------------- |
|
||||||
| .ConfigPath ... | Machine configuration file location |
|
| .ConfigPath ... | Machine configuration file location |
|
||||||
| .ConnectionInfo ... | Machine connection information |
|
| .ConnectionInfo ... | Machine connection information |
|
||||||
| .Created | Machine creation time (string, ISO3601) |
|
| .Created | Machine creation time (string, ISO3601) |
|
||||||
@ -32,6 +32,7 @@ Print results with a Go template.
|
|||||||
| .LastUp | Time when machine was last booted |
|
| .LastUp | Time when machine was last booted |
|
||||||
| .Name | Name of the machine |
|
| .Name | Name of the machine |
|
||||||
| .Resources ... | Resources used by 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 |
|
| .SSHConfig ... | SSH configuration info for communitating with machine |
|
||||||
| .State ... | Machine state |
|
| .State ... | Machine state |
|
||||||
| .UserModeNetworking | Whether this machine uses user-mode networking |
|
| .UserModeNetworking | Whether this machine uses user-mode networking |
|
||||||
|
@ -317,6 +317,7 @@ func (m *MacMachine) Inspect() (*machine.InspectInfo, error) {
|
|||||||
},
|
},
|
||||||
SSHConfig: m.SSHConfig,
|
SSHConfig: m.SSHConfig,
|
||||||
State: vmState,
|
State: vmState,
|
||||||
|
Rootful: m.Rootful,
|
||||||
}
|
}
|
||||||
return &ii, nil
|
return &ii, nil
|
||||||
}
|
}
|
||||||
|
@ -151,6 +151,7 @@ type InspectInfo struct {
|
|||||||
SSHConfig SSHConfig
|
SSHConfig SSHConfig
|
||||||
State Status
|
State Status
|
||||||
UserModeNetworking bool
|
UserModeNetworking bool
|
||||||
|
Rootful bool
|
||||||
}
|
}
|
||||||
|
|
||||||
func (rc RemoteConnectionType) MakeSSHURL(host, path, port, userName string) url.URL {
|
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,
|
SSHConfig: m.SSHConfig,
|
||||||
State: vm.State().String(),
|
State: vm.State().String(),
|
||||||
|
Rootful: m.Rootful,
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1596,6 +1596,7 @@ func (v *MachineVM) Inspect() (*machine.InspectInfo, error) {
|
|||||||
SSHConfig: v.SSHConfig,
|
SSHConfig: v.SSHConfig,
|
||||||
State: state,
|
State: state,
|
||||||
UserModeNetworking: true, // always true
|
UserModeNetworking: true, // always true
|
||||||
|
Rootful: v.Rootful,
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1745,6 +1745,7 @@ func (v *MachineVM) Inspect() (*machine.InspectInfo, error) {
|
|||||||
SSHConfig: v.SSHConfig,
|
SSHConfig: v.SSHConfig,
|
||||||
State: state,
|
State: state,
|
||||||
UserModeNetworking: v.UserModeNetworking,
|
UserModeNetworking: v.UserModeNetworking,
|
||||||
|
Rootful: v.Rootful,
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user