github.com/niedbalski/juju@v0.0.0-20190215020005-8ff100488e47/cloudconfig/cloudinit/cloudinit_opensuse.go (about)

     1  // Copyright 2015 Canonical Ltd.
     2  // Copyright 2015 Cloudbase Solutions SRL
     3  // Licensed under the AGPLv3, see LICENCE file for details.
     4  
     5  package cloudinit
     6  
     7  import (
     8  	"github.com/juju/packaging/commands"
     9  	"github.com/juju/proxy"
    10  )
    11  
    12  //Implementation of PackageHelper for OpenSUSE
    13  type openSUSEHelper struct {
    14  	paccmder commands.PackageCommander
    15  }
    16  
    17  //Returns the list of required packages in OpenSUSE
    18  func (helper openSUSEHelper) getRequiredPackages() []string {
    19  	return []string{
    20  		"curl",
    21  		"bridge-utils",
    22  		//"cloud-utils", Put as a requirement to the cloud image (requires subscription)
    23  		"ncat",
    24  		"tmux",
    25  	}
    26  }
    27  
    28  // addPackageProxyCmd is a helper method which returns the corresponding runcmd
    29  // to apply the package proxy settings for OpenSUSE
    30  func (helper openSUSEHelper) addPackageProxyCmd(url string) string {
    31  	return helper.paccmder.SetProxyCmds(proxy.Settings{
    32  		Http: url,
    33  	})[0]
    34  }