Vendor in containers/common v0.46.0

Fixes: https://github.com/containers/podman/issues/11745

[NO TESTS NEEDED] Since this is just a revendor and a one line
change for the revendor

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
This commit is contained in:
Daniel J Walsh
2021-09-26 06:17:53 -04:00
committed by Valentin Rothberg
parent e19a09c3df
commit 5a2ca77b9b
10 changed files with 83 additions and 53 deletions

View File

@ -208,6 +208,7 @@ func DefaultConfig() (*Config, error) {
},
Engine: *defaultEngineConfig,
Secrets: defaultSecretConfig(),
Machine: defaultMachineConfig(),
}, nil
}
@ -219,6 +220,16 @@ func defaultSecretConfig() SecretConfig {
}
}
// defaultMachineConfig returns the default machine configuration.
func defaultMachineConfig() MachineConfig {
return MachineConfig{
CPUs: 1,
DiskSize: 10,
Image: "testing",
Memory: 2048,
}
}
// defaultConfigFromMemory returns a default engine configuration. Note that the
// config is different for root and rootless. It also parses the storage.conf.
func defaultConfigFromMemory() (*EngineConfig, error) {
@ -345,8 +356,6 @@ func defaultConfigFromMemory() (*EngineConfig, error) {
// constants.
c.LockType = "shm"
c.MachineEnabled = false
c.MachineImage = "testing"
c.ChownCopiedFiles = true
return c, nil
@ -566,9 +575,3 @@ func (c *Config) MachineEnabled() bool {
func (c *Config) RootlessNetworking() string {
return c.Containers.RootlessNetworking
}
// MachineImage returns the image to be
// used when creating a podman-machine VM
func (c *Config) MachineImage() string {
return c.Engine.MachineImage
}