_id stringlengths 2 7 | text stringlengths 6 2.61k | title stringclasses 1
value |
|---|---|---|
c4000 | // setAccess changes the user's access permissions on the controller. | |
c4001 | // controllerUser a model userAccessDoc. | |
c4002 | // RemoveControllerUser removes a user from the database. | |
c4003 | // Info implements the API method. | |
c4004 | // Get returns the charm configuration for an application.
// It zeros out any application config as that was not supported in v5. | |
c4005 | // Get returns the charm configuration for an application.
// This used the confusing "default" boolean to mean the value was set from
// the charm defaults. Needs to be kept for backwards compatibility. | |
c4006 | // AddUser adds a new user for the model to the database. | |
c4007 | // AddControllerUser adds a new user for the current controller to the database. | |
c4008 | // userAccessID returns the document id of the user access. | |
c4009 | // NewModelUserAccess returns a new permission.UserAccess for the given userDoc and
// current Model. | |
c4010 | // NewControllerUserAccess returns a new permission.UserAccess for the given userDoc and
// current Controller. | |
c4011 | // UserPermission returns the access permission for the passed subject and target. | |
c4012 | // UserAccess returns a new permission.UserAccess for the passed subject and target. | |
c4013 | // RemoveUserAccess removes access for subject to the passed tag. | |
c4014 | // populateMachineMaps updates task.instances. Also updates
// task.machines map if a list of IDs is given. | |
c4015 | // pendingOrDead looks up machines with ids and returns those that do not
// have an instance id assigned yet, and also those that are dead. | |
c4016 | // findUnknownInstances finds instances which are not associated with a machine. | |
c4017 | // instancesForDeadMachines returns a list of instances.Instance that represent
// the list of dead machines running in the provider. Missing machines are
// omitted from the list. | |
c4018 | // populateAvailabilityZoneMachines fills in the map, availabilityZoneMachines,
// if empty, with a current mapping of availability zone to IDs of machines
// running in that zone. If the provider does not implement the ZonedEnviron
// interface, return nil. | |
c4019 | // populateDistributionGroupZoneMap returns a zone mapping which only includes
// machines in the same distribution group. This is used to determine where new
// machines in that distribution group should be placed. | |
c4020 | // machineAvailabilityZoneDistribution returns a suggested availability zone
// for the specified machine to start in.
// If the current provider does not implement availability zones, "" and no
// error will be returned.
// Machines are spread across availability zones based on lowest population of
// the "available" zones, and any supplied zone constraints.
// Machines in the same DistributionGroup are placed in different zones,
// distributed based on lowest population of machines in that DistributionGroup.
// Machines are not placed in a zone they are excluded from.
// If availability zones are implemented and one isn't found, return NotFound error. | |
c4021 | // FilterZones returns a new instance consisting of slice members limited to
// zones expressed in the input constraints.
// Absence of zone constraints leaves the return unfiltered. | |
c4022 | // startMachines starts a goroutine for each specified machine to
// start it. Errors from individual start machine attempts will be logged. | |
c4023 | // setupToStartMachine gathers the necessary information,
// based on the specified machine, to create ProvisioningInfo
// and StartInstanceParams to be used by startMachine. | |
c4024 | // populateExcludedMachines, translates the results of DeriveAvailabilityZones
// into availabilityZoneMachines.ExcludedMachineIds for machines not to be used
// in the given zone. | |
c4025 | // gatherCharmLXDProfiles consumes the charms LXD Profiles from the different
// sources. This includes getting the information from the broker. | |
c4026 | // markMachineFailedInAZ moves the machine in zone from MachineIds to FailedMachineIds
// in availabilityZoneMachines, report if there are any availability zones not failed for
// the specified machine. | |
c4027 | // removeMachineFromAZMap removes the specified machine from availabilityZoneMachines.
// It is assumed this is called when the machines are being deleted from state, or failed
// provisioning. | |
c4028 | // GetCredentials returns a curated set of credential values for a given cloud.
// The credential key values are read from the credentials store and the provider
// finalises the values to resolve things like json files.
// If region is not specified, the default credential region is used. | |
c4029 | // FinalizeFileContent replaces the path content of cloud credentials "file" attribute with its content. | |
c4030 | // credentialByName returns the credential and default region to use for the
// specified cloud, optionally specifying a credential name. If no credential
// name is specified, then use the default credential for the cloud if one has
// been specified. The credential name is returned also, in case the default
// credential is used. If there is only one credential, it is implicitly the
// default.
//
// If there exists no matching credentials, an error satisfying
// errors.IsNotFound will be returned. | |
c4031 | // DetectCredential detects credentials for the specified cloud type, and, if
// exactly one is detected, returns it.
//
// If no credentials are detected, an error satisfying errors.IsNotFound will
// be returned. If more than one credential is detected, ErrMultipleCredentials
// will be returned. | |
c4032 | // RegisterCredentials returns any credentials that need to be registered for
// a provider. | |
c4033 | // NewMockAPICalls creates a new mock instance | |
c4034 | // ContainerConfig mocks base method | |
c4035 | // ContainerConfig indicates an expected call of ContainerConfig | |
c4036 | // GetContainerInterfaceInfo indicates an expected call of GetContainerInterfaceInfo | |
c4037 | // GetContainerProfileInfo mocks base method | |
c4038 | // HostChangesForContainer mocks base method | |
c4039 | // PrepareContainerInterfaceInfo mocks base method | |
c4040 | // ReleaseContainerAddresses mocks base method | |
c4041 | // SetHostMachineNetworkConfig mocks base method | |
c4042 | // sequence safely increments a database backed sequence, returning
// the next value. | |
c4043 | // sequenceWithMin safely increments a database backed sequence,
// allowing for a minimum value for the sequence to be specified. The
// minimum value is used as an initial value for the first use of a
// particular sequence. The minimum value will also cause a sequence
// value to jump ahead if the minimum is provided that is higher than
// the current sequence value.
//
// The data manipulated by `sequence` and `sequenceWithMin` is the
// same. It is safe to mix the 2 methods for the same sequence.
//
// `sequence` is more efficient than `sequenceWithMin` and should be
// preferred if there is no minimum value requirement. | |
c4044 | // Sequences returns the model's sequence names and their next values. | |
c4045 | // updateSeqWithMin implements the abstract logic for incrementing a
// database backed sequence in a concurrency aware way.
//
// It is complicated because MongoDB's atomic update primitives don't
// provide a way to upsert a counter while also providing an initial
// value. Instead, a number of database operations are used for each
// sequence update, relying on the atomicity guarantees that MongoDB
// offers. Optimistic database updates are attempted with retries when
// contention is observed. | |
c4046 | // EnsureSymlinks creates a symbolic link to jujud within dir for each
// command. If the commands already exist, this operation does nothing.
// If dir is a symbolic link, it will be dereferenced first. | |
c4047 | // Validate validates the bootstrap parameters. | |
c4048 | // withDefaultControllerConstraints returns the given constraints,
// updated to choose a default instance type appropriate for a
// controller machine. We use this only if the user does not specify
// any constraints that would otherwise control the instance type
// selection. | |
c4049 | // Bootstrap bootstraps the given environment. The supplied constraints are
// used to provision the instance, and are also set within the bootstrapped
// environment. | |
c4050 | // bootstrapImageMetadata returns the image metadata to use for bootstrapping
// the given environment. If the environment provider does not make use of
// simplestreams, no metadata will be returned.
//
// If a bootstrap image ID is specified, image metadata will be synthesised
// using that image ID, and the architecture and series specified by the
// initiator. In addition, the custom image metadata that is saved into the
// state database will have the synthesised image metadata added to it. | |
c4051 | // getBootstrapToolsVersion returns the newest tools from the given tools list. | |
c4052 | // setBootstrapToolsVersion updates the agent-version configuration attribute. | |
c4053 | // findCompatibleTools finds tools in the list that have the same major, minor
// and patch level as jujuversion.Current.
//
// Build number is not important to match; uploaded tools will have
// incremented build number, and we want to match them. | |
c4054 | // setPrivateMetadataSources verifies the specified metadataDir exists,
// uses it to set the default agent metadata source for agent binaries,
// and adds an image metadata source after verifying the contents. If the
// directory ends in tools, only the default tools metadata source will be
// set. Same for images. | |
c4055 | // guiArchive returns information on the GUI archive that will be uploaded
// to the controller. Possible errors in retrieving the GUI archive information
// do not prevent the model to be bootstrapped. If dataSourceBaseURL is
// non-empty, remote GUI archive info is retrieved from simplestreams using it
// as the base URL. The given logProgress function is used to inform users
// about errors or progress in setting up the Juju GUI. | |
c4056 | // hashAndSize calculates and returns the SHA256 hash and the size of the file
// located at the given path. | |
c4057 | // NewListEndpointsCommand constructs new list endpoint command. | |
c4058 | // convertCharmEndpoints takes any number of charm relations and
// creates a collection of ui-formatted endpoints. | |
c4059 | // GetState returns a new State instance for the specified model. The
// connection uses the same credentials and policy as the Controller. | |
c4060 | // Ping probes the Controllers's database connection to ensure that it
// is still alive. | |
c4061 | // ControllerConfig returns the config values for the controller. | |
c4062 | // checkSpaceIsAvailableToAllControllers checks if each controller machine has
// at least one address in the input space. If not, an error is returned. | |
c4063 | // Supports is defined on the storage.Provider interface. | |
c4064 | // DefaultPools is defined on the storage.Provider interface. | |
c4065 | // ValidateBranchName returns an error if the input name is not suitable for
// identifying a new in-flight branch. | |
c4066 | // NewStorage constructs a new Storage that stores image blobs
// in an "osimages" database. Image metadata is also stored in this
// database in the "imagemetadata" collection. | |
c4067 | // AddImage is defined on the Storage interface. | |
c4068 | // ListImages is defined on the Storage interface. | |
c4069 | // DeleteImage is defined on the Storage interface. | |
c4070 | // Image is defined on the Storage interface. | |
c4071 | // imagePath returns the storage path for the specified image. | |
c4072 | // docId returns an id for the mongo image metadata document. | |
c4073 | // ReadCharmURL reads a charm identity file from the supplied path. | |
c4074 | // WriteCharmURL writes a charm identity file into the supplied path. | |
c4075 | // LXDProfile returns the lxd profile of this charm. | |
c4076 | // NewSetFirewallRuleCommand returns a command to set firewall rules. | |
c4077 | // Use implements Tracker. | |
c4078 | // Done implements Tracker. | |
c4079 | // resourceID converts an external resource ID into an internal one. | |
c4080 | // newResolvePendingResourceOps generates transaction operations that
// will resolve a pending resource doc and make it active.
//
// We trust that the provided resource really is pending
// and that it matches the existing doc with the same ID. | |
c4081 | // newCharmStoreResourceDoc generates a doc that represents the given resource. | |
c4082 | // newUnitResourceDoc generates a doc that represents the given resource. | |
c4083 | // newResourceDoc generates a doc that represents the given resource. | |
c4084 | // newStagedResourceDoc generates a staging doc that represents
// the given resource. | |
c4085 | // resources returns the resource docs for the given application. | |
c4086 | // getOne returns the resource that matches the provided model ID. | |
c4087 | // getOnePending returns the resource that matches the provided model ID. | |
c4088 | // resource2doc converts the resource into a DB doc. | |
c4089 | // doc2resource returns the resource info represented by the doc. | |
c4090 | // doc2basicResource returns the resource info represented by the doc. | |
c4091 | // Close closes the stream. | |
c4092 | // Validate validates the upgrade-series worker configuration. | |
c4093 | // NewWorker creates, starts and returns a new upgrade-series worker based on
// the input configuration. | |
c4094 | // handleUpgradeSeriesChange retrieves the current upgrade-series status for
// this machine and based on the status, calls methods that will progress
// the workflow accordingly. | |
c4095 | // handlePrepareStarted handles workflow for the machine with an upgrade-series
// lock status of "UpgradeSeriesPrepareStarted" | |
c4096 | // transitionPrepareComplete rewrites service unit files for unit agents running
// on this machine so that they are compatible with the init system of the
// series upgrade target. | |
c4097 | // transitionUnitsStarted iterates over units managed by this machine. Starts
// the unit's agent service, and transitions all unit subordinate statuses. | |
c4098 | // handleCompleted notifies the server that it has completed the upgrade
// workflow, then unpins leadership for applications running on the machine. | |
c4099 | // pinLeaders pins leadership for applications
// represented by units running on this machine. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.