juju: github.com/wallyworld/juju/provider/azure Index | Files

package azure

import "github.com/wallyworld/juju/provider/azure"


Package Files

async.go auth.go config.go credentials.go deployments.go environ.go environprovider.go init.go instance.go instance_information.go instancetype.go networking.go storage.go upgrades.go userdata.go utils.go vmextension.go

func AuthToken Uses

func AuthToken(cloud environscloudspec.CloudSpec, sender autorest.Sender) (*adal.ServicePrincipalToken, error)

AuthToken returns a service principal token, suitable for authorizing Resource Manager API requests, based on the supplied CloudSpec.

func NewEnvironProvider Uses

func NewEnvironProvider(config ProviderConfig) (*azureEnvironProvider, error)

NewEnvironProvider returns a new EnvironProvider for Azure.

func NewProvider Uses

func NewProvider(config ProviderConfig) (environs.CloudEnvironProvider, error)

NewProvider instantiates and returns the Azure EnvironProvider using the given configuration.

type AzureCLI Uses

type AzureCLI interface {
    ListAccounts() ([]azurecli.Account, error)
    FindAccountsWithCloudName(name string) ([]azurecli.Account, error)
    ShowAccount(subscription string) (*azurecli.Account, error)
    GetAccessToken(subscription, resource string) (*azurecli.AccessToken, error)
    FindCloudsWithResourceManagerEndpoint(url string) ([]azurecli.Cloud, error)
    ListClouds() ([]azurecli.Cloud, error)

type AzureRenderer Uses

type AzureRenderer struct{}

func (AzureRenderer) Render Uses

func (AzureRenderer) Render(cfg cloudinit.CloudConfig, os jujuos.OSType) ([]byte, error)

type ProviderConfig Uses

type ProviderConfig struct {
    // Sender is the autorest.Sender that will be used by Azure
    // clients. If sender is nil, the default HTTP client sender
    // will be used.
    Sender autorest.Sender

    // RequestInspector will be used to inspect Azure requests
    // if it is non-nil.
    RequestInspector autorest.PrepareDecorator

    // NewStorageClient will be used to construct new storage
    // clients.
    NewStorageClient azurestorage.NewClientFunc

    // RetryClock is used for retrying some operations, like
    // waiting for deployments to complete.
    // Retries due to rate-limiting are handled by the go-autorest
    // package, which uses "time" directly. We cannot mock the
    // waiting in that case.
    RetryClock clock.Clock

    // RandomWindowsAdminPassword is a function used to generate
    // a random password for the Windows admin user.
    RandomWindowsAdminPassword func() string

    // GneerateSSHKey is a functio nused to generate a new SSH
    // key pair for provisioning Linux machines.
    GenerateSSHKey func(comment string) (private, public string, _ error)

    // ServicePrincipalCreator is the interface used to create service principals.
    ServicePrincipalCreator ServicePrincipalCreator

    // AzureCLI is the interface the to Azure CLI (az) command.
    AzureCLI AzureCLI

    // LoadBalancerSkuName is the load balancer SKU name.
    // Legal values are determined by the Azure SDK.
    LoadBalancerSkuName string

ProviderConfig contains configuration for the Azure providers.

func (ProviderConfig) Validate Uses

func (cfg ProviderConfig) Validate() error

Validate validates the Azure provider configuration.

type ServicePrincipalCreator Uses

type ServicePrincipalCreator interface {
    InteractiveCreate(sdkCtx context.Context, stderr io.Writer, params azureauth.ServicePrincipalParams) (appid, password string, _ error)
    Create(sdkCtx context.Context, params azureauth.ServicePrincipalParams) (appid, password string, _ error)

Package azure imports 68 packages (graph). Updated 2020-08-06. Refresh now. Tools for package owners.