juju: github.com/juju/juju/provider/oci/common Index | Files

package common

import "github.com/juju/juju/provider/oci/common"

Index

Package Files

client.go errors.go interfaces.go

func HandleCredentialError Uses

func HandleCredentialError(err error, ctx context.ProviderCallContext)

HandleCredentialError marks the current credentials as invalid internally

if Oracle believes that they are expired

func IsAuthorisationFailure Uses

func IsAuthorisationFailure(err error) bool

IsAuthorisationFailure reports whether the error is related to attempting to access the provider with invalid or expired credentials.

func ValidateKey Uses

func ValidateKey(key []byte, passphrase string) error

type JujuConfigProvider Uses

type JujuConfigProvider struct {
    Key         []byte
    Fingerprint string
    Passphrase  string
    Tenancy     string
    User        string
    OCIRegion   string
}

func (JujuConfigProvider) Config Uses

func (j JujuConfigProvider) Config() (ociCommon.ConfigurationProvider, error)

Config returns a new ociCommon.ConfigurationProvider instance

func (JujuConfigProvider) KeyFingerprint Uses

func (j JujuConfigProvider) KeyFingerprint() (string, error)

func (JujuConfigProvider) KeyID Uses

func (j JujuConfigProvider) KeyID() (string, error)

func (JujuConfigProvider) PrivateRSAKey Uses

func (j JujuConfigProvider) PrivateRSAKey() (*rsa.PrivateKey, error)

func (JujuConfigProvider) Region Uses

func (j JujuConfigProvider) Region() (string, error)

func (JujuConfigProvider) TenancyOCID Uses

func (j JujuConfigProvider) TenancyOCID() (string, error)

func (JujuConfigProvider) UserOCID Uses

func (j JujuConfigProvider) UserOCID() (string, error)

func (JujuConfigProvider) Validate Uses

func (j JujuConfigProvider) Validate() error

type OCIComputeClient Uses

type OCIComputeClient interface {
    ListVnicAttachments(ctx context.Context, request ociCore.ListVnicAttachmentsRequest) (response ociCore.ListVnicAttachmentsResponse, err error)
    TerminateInstance(ctx context.Context, request ociCore.TerminateInstanceRequest) (response ociCore.TerminateInstanceResponse, err error)
    GetInstance(ctx context.Context, request ociCore.GetInstanceRequest) (response ociCore.GetInstanceResponse, err error)
    LaunchInstance(ctx context.Context, request ociCore.LaunchInstanceRequest) (response ociCore.LaunchInstanceResponse, err error)
    ListInstances(ctx context.Context, request ociCore.ListInstancesRequest) (response ociCore.ListInstancesResponse, err error)
    ListShapes(ctx context.Context, request ociCore.ListShapesRequest) (response ociCore.ListShapesResponse, err error)
    ListImages(ctx context.Context, request ociCore.ListImagesRequest) (response ociCore.ListImagesResponse, err error)

    ListVolumeAttachments(ctx context.Context, request ociCore.ListVolumeAttachmentsRequest) (response ociCore.ListVolumeAttachmentsResponse, err error)
    GetVolumeAttachment(ctx context.Context, request ociCore.GetVolumeAttachmentRequest) (response ociCore.GetVolumeAttachmentResponse, err error)
    DetachVolume(ctx context.Context, request ociCore.DetachVolumeRequest) (response ociCore.DetachVolumeResponse, err error)
    AttachVolume(ctx context.Context, request ociCore.AttachVolumeRequest) (response ociCore.AttachVolumeResponse, err error)
}

go:generate mockgen -package testing -destination ../testing/mocks_compute.go github.com/juju/juju/provider/oci/common OCIComputeClient

type OCIFirewallClient Uses

type OCIFirewallClient interface {
    CreateSecurityList(ctx context.Context, request ociCore.CreateSecurityListRequest) (response ociCore.CreateSecurityListResponse, err error)
    ListSecurityLists(ctx context.Context, request ociCore.ListSecurityListsRequest) (response ociCore.ListSecurityListsResponse, err error)
    DeleteSecurityList(ctx context.Context, request ociCore.DeleteSecurityListRequest) (response ociCore.DeleteSecurityListResponse, err error)
    GetSecurityList(ctx context.Context, request ociCore.GetSecurityListRequest) (response ociCore.GetSecurityListResponse, err error)
}

go:generate mockgen -package testing -destination ../testing/mocks_firewall.go github.com/juju/juju/provider/oci/common OCIFirewallClient

type OCIIdentityClient Uses

type OCIIdentityClient interface {
    ListAvailabilityDomains(ctx context.Context, request ociIdentity.ListAvailabilityDomainsRequest) (response ociIdentity.ListAvailabilityDomainsResponse, err error)
    ListCompartments(ctx context.Context, request ociIdentity.ListCompartmentsRequest) (response ociIdentity.ListCompartmentsResponse, err error)
}

go:generate mockgen -package testing -destination ../testing/mocks_identity.go github.com/juju/juju/provider/oci/common OCIIdentityClient

type OCINetworkingClient Uses

type OCINetworkingClient interface {
    CreateVcn(ctx context.Context, request ociCore.CreateVcnRequest) (response ociCore.CreateVcnResponse, err error)
    DeleteVcn(ctx context.Context, request ociCore.DeleteVcnRequest) (response ociCore.DeleteVcnResponse, err error)
    ListVcns(ctx context.Context, request ociCore.ListVcnsRequest) (response ociCore.ListVcnsResponse, err error)
    GetVcn(ctx context.Context, request ociCore.GetVcnRequest) (response ociCore.GetVcnResponse, err error)

    CreateSubnet(ctx context.Context, request ociCore.CreateSubnetRequest) (response ociCore.CreateSubnetResponse, err error)
    ListSubnets(ctx context.Context, request ociCore.ListSubnetsRequest) (response ociCore.ListSubnetsResponse, err error)
    DeleteSubnet(ctx context.Context, request ociCore.DeleteSubnetRequest) (response ociCore.DeleteSubnetResponse, err error)
    GetSubnet(ctx context.Context, request ociCore.GetSubnetRequest) (response ociCore.GetSubnetResponse, err error)

    CreateInternetGateway(ctx context.Context, request ociCore.CreateInternetGatewayRequest) (response ociCore.CreateInternetGatewayResponse, err error)
    GetInternetGateway(ctx context.Context, request ociCore.GetInternetGatewayRequest) (response ociCore.GetInternetGatewayResponse, err error)
    ListInternetGateways(ctx context.Context, request ociCore.ListInternetGatewaysRequest) (response ociCore.ListInternetGatewaysResponse, err error)
    DeleteInternetGateway(ctx context.Context, request ociCore.DeleteInternetGatewayRequest) (response ociCore.DeleteInternetGatewayResponse, err error)

    CreateRouteTable(ctx context.Context, request ociCore.CreateRouteTableRequest) (response ociCore.CreateRouteTableResponse, err error)
    GetRouteTable(ctx context.Context, request ociCore.GetRouteTableRequest) (response ociCore.GetRouteTableResponse, err error)
    DeleteRouteTable(ctx context.Context, request ociCore.DeleteRouteTableRequest) (response ociCore.DeleteRouteTableResponse, err error)
    ListRouteTables(ctx context.Context, request ociCore.ListRouteTablesRequest) (response ociCore.ListRouteTablesResponse, err error)

    GetVnic(ctx context.Context, request ociCore.GetVnicRequest) (response ociCore.GetVnicResponse, err error)
}

go:generate mockgen -package testing -destination ../testing/mocks_networking.go github.com/juju/juju/provider/oci/common OCINetworkingClient

type OCIStorageClient Uses

type OCIStorageClient interface {
    CreateVolume(ctx context.Context, request ociCore.CreateVolumeRequest) (response ociCore.CreateVolumeResponse, err error)
    ListVolumes(ctx context.Context, request ociCore.ListVolumesRequest) (response ociCore.ListVolumesResponse, err error)
    GetVolume(ctx context.Context, request ociCore.GetVolumeRequest) (response ociCore.GetVolumeResponse, err error)
    DeleteVolume(ctx context.Context, request ociCore.DeleteVolumeRequest) (response ociCore.DeleteVolumeResponse, err error)
    UpdateVolume(ctx context.Context, request ociCore.UpdateVolumeRequest) (response ociCore.UpdateVolumeResponse, err error)
}

go:generate mockgen -package testing -destination ../testing/mocks_storage.go github.com/juju/juju/provider/oci/common OCIStorageClient

Package common imports 12 packages (graph) and is imported by 3 packages. Updated 2019-09-15. Refresh now. Tools for package owners.