github.com/emc-advanced-dev/unik@v0.0.0-20190717152701-a58d3e8e33b7/pkg/config/config.go (about)

     1  package config
     2  
     3  type DaemonConfig struct {
     4  	Providers Providers `yaml:"providers"`
     5  	Version   string    `yaml:"version"`
     6  }
     7  
     8  type Providers struct {
     9  	Aws         []Aws         `yaml:"aws"`
    10  	Gcloud      []Gcloud      `yaml:"gcloud"`
    11  	Vsphere     []Vsphere     `yaml:"vsphere"`
    12  	Virtualbox  []Virtualbox  `yaml:"virtualbox"`
    13  	Qemu        []Qemu        `yaml:"qemu"`
    14  	Photon      []Photon      `yaml:"photon"`
    15  	Xen         []Xen         `yaml:"xen"`
    16  	Openstack   []Openstack   `yaml:"openstack"`
    17  	Ukvm        []Ukvm        `yaml:"ukvm"`
    18  	Firecracker []Firecracker `yaml:"firecracker"`
    19  }
    20  
    21  type Aws struct {
    22  	Name   string `yaml:"name"`
    23  	Region string `yaml:"region"`
    24  	Zone   string `yaml:"zone"`
    25  }
    26  
    27  type Gcloud struct {
    28  	Name      string `yaml:"name"`
    29  	ProjectID string `yaml:"project_id"`
    30  	Zone      string `yaml:"zone"`
    31  }
    32  
    33  type Vsphere struct {
    34  	Name            string `yaml:"name"`
    35  	VsphereUser     string `yaml:"vsphere_user"`
    36  	VspherePassword string `yaml:"vsphere_password"`
    37  	VsphereURL      string `yaml:"vsphere_url"`
    38  	Datastore       string `yaml:"datastore"`
    39  	Datacenter      string `yaml:"datacenter"`
    40  	NetworkLabel    string `yaml:"network"`
    41  }
    42  
    43  type Photon struct {
    44  	Name      string `yaml:"name"`
    45  	PhotonURL string `yaml:"photon_url"`
    46  	ProjectId string `yaml:"project_id"`
    47  }
    48  
    49  type Virtualbox struct {
    50  	Name                  string                `yaml:"name"`
    51  	AdapterName           string                `yaml:"adapter_name"`
    52  	VirtualboxAdapterType VirtualboxAdapterType `yaml:"adapter_type"`
    53  }
    54  
    55  type Qemu struct {
    56  	Name         string `yaml:"name"`
    57  	NoGraphic    bool   `yaml:"no_graphic"`
    58  	DebuggerPort int    `yaml:"debugger_port"`
    59  }
    60  type Firecracker struct {
    61  	Name string `yaml:"name"`
    62  
    63  	Binary string `yaml:"binary"`
    64  	Kernel string `yaml:"kernel"`
    65  	// either empty, stdio, or xterm
    66  	Console string `yaml:"console"`
    67  }
    68  
    69  type Ukvm struct {
    70  	Name string `yaml:"name"`
    71  	Tap  string `yaml:"tap_device"`
    72  }
    73  
    74  type Xen struct {
    75  	Name       string `yaml:"name"`
    76  	KernelPath string `yaml:"pv_kernel"`
    77  	XenBridge  string `yaml:"xen_bridge"`
    78  }
    79  
    80  type Openstack struct {
    81  	Name string `yaml:"name"`
    82  
    83  	UserName   string `yaml:"username"`
    84  	UserId     string `yaml:"userid"`
    85  	Password   string `yaml:"password"`
    86  	AuthUrl    string `yaml:"auth_url"`
    87  	TenantId   string `yaml:"tenant_id"`
    88  	TenantName string `yaml:"tenant_name"`
    89  	DomainId   string `yaml:"domain_id"`
    90  	DomainName string `yaml:"domain_name"`
    91  
    92  	ProjectName string `yaml:"project_name"`
    93  	RegionId    string `yaml:"region_id"`
    94  	RegionName  string `yaml:"region_name"`
    95  
    96  	NetworkUUID string `yaml:"network_uuid"`
    97  }
    98  
    99  type VirtualboxAdapterType string
   100  
   101  const (
   102  	BridgedAdapter  = VirtualboxAdapterType("bridged")
   103  	HostOnlyAdapter = VirtualboxAdapterType("host_only")
   104  )
   105  
   106  type ClientConfig struct {
   107  	Host string `yaml:"host"`
   108  }
   109  
   110  type HubConfig struct {
   111  	URL      string `yaml:"url",json:"url"`
   112  	Username string `yaml:"user",json:"user"`
   113  	Password string `yaml:"pass",json:"pass"`
   114  }