environment: encapsulate the environment images are deployed to
This represents how our systems should integrate into their environment, typically using some sort of agent, or commonly cloud-init. In the future we could imagine this representing network configuration or any other kind of configuration necessary to reach the environment as well. For now EC2 and Azure is supported, and stub environments are added to show the idea, but these are not implemented/used yet.
This commit is contained in:
parent
7a534d4d1e
commit
452cb2dae9
10 changed files with 89 additions and 15 deletions
25
internal/environment/environment.go
Normal file
25
internal/environment/environment.go
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
package environment
|
||||
|
||||
import "github.com/osbuild/osbuild-composer/internal/rpmmd"
|
||||
|
||||
type Environment interface {
|
||||
GetPackages() []string
|
||||
GetRepos() []rpmmd.RepoConfig
|
||||
GetServices() []string
|
||||
}
|
||||
|
||||
type BaseEnvironment struct {
|
||||
Repos []rpmmd.RepoConfig
|
||||
}
|
||||
|
||||
func (p BaseEnvironment) GetPackages() []string {
|
||||
return []string{}
|
||||
}
|
||||
|
||||
func (p BaseEnvironment) GetRepos() []rpmmd.RepoConfig {
|
||||
return p.Repos
|
||||
}
|
||||
|
||||
func (p BaseEnvironment) GetServices() []string {
|
||||
return []string{}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue