_id stringlengths 2 7 | title stringclasses 1
value | partition stringclasses 3
values | text stringlengths 6 2.61k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
c4000 | train | // setAccess changes the user's access permissions on the controller. | {
"resource": ""
} | ||
c4001 | train | // controllerUser a model userAccessDoc. | {
"resource": ""
} | ||
c4002 | train | // RemoveControllerUser removes a user from the database. | {
"resource": ""
} | ||
c4003 | train | // Info implements the API method. | {
"resource": ""
} | ||
c4004 | train | // Get returns the charm configuration for an application.
// It zeros out any application config as that was not supported in v5. | {
"resource": ""
} | ||
c4005 | train | // 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. | {
"resource": ""
} | ||
c4006 | train | // AddUser adds a new user for the model to the database. | {
"resource": ""
} | ||
c4007 | train | // AddControllerUser adds a new user for the current controller to the database. | {
"resource": ""
} | ||
c4008 | train | // userAccessID returns the document id of the user access. | {
"resource": ""
} | ||
c4009 | train | // NewModelUserAccess returns a new permission.UserAccess for the given userDoc and
// current Model. | {
"resource": ""
} | ||
c4010 | train | // NewControllerUserAccess returns a new permission.UserAccess for the given userDoc and
// current Controller. | {
"resource": ""
} | ||
c4011 | train | // UserPermission returns the access permission for the passed subject and target. | {
"resource": ""
} | ||
c4012 | train | // UserAccess returns a new permission.UserAccess for the passed subject and target. | {
"resource": ""
} | ||
c4013 | train | // RemoveUserAccess removes access for subject to the passed tag. | {
"resource": ""
} | ||
c4014 | train | // populateMachineMaps updates task.instances. Also updates
// task.machines map if a list of IDs is given. | {
"resource": ""
} | ||
c4015 | train | // pendingOrDead looks up machines with ids and returns those that do not
// have an instance id assigned yet, and also those that are dead. | {
"resource": ""
} | ||
c4016 | train | // findUnknownInstances finds instances which are not associated with a machine. | {
"resource": ""
} | ||
c4017 | train | // 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. | {
"resource": ""
} | ||
c4018 | train | // 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. | {
"resource": ""
} | ||
c4019 | train | // 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. | {
"resource": ""
} | ||
c4020 | train | // 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" ... | {
"resource": ""
} | ||
c4021 | train | // 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. | {
"resource": ""
} | ||
c4022 | train | // startMachines starts a goroutine for each specified machine to
// start it. Errors from individual start machine attempts will be logged. | {
"resource": ""
} | ||
c4023 | train | // setupToStartMachine gathers the necessary information,
// based on the specified machine, to create ProvisioningInfo
// and StartInstanceParams to be used by startMachine. | {
"resource": ""
} | ||
c4024 | train | // populateExcludedMachines, translates the results of DeriveAvailabilityZones
// into availabilityZoneMachines.ExcludedMachineIds for machines not to be used
// in the given zone. | {
"resource": ""
} | ||
c4025 | train | // gatherCharmLXDProfiles consumes the charms LXD Profiles from the different
// sources. This includes getting the information from the broker. | {
"resource": ""
} | ||
c4026 | train | // 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. | {
"resource": ""
} | ||
c4027 | train | // removeMachineFromAZMap removes the specified machine from availabilityZoneMachines.
// It is assumed this is called when the machines are being deleted from state, or failed
// provisioning. | {
"resource": ""
} | ||
c4028 | train | // 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. | {
"resource": ""
} | ||
c4029 | train | // FinalizeFileContent replaces the path content of cloud credentials "file" attribute with its content. | {
"resource": ""
} | ||
c4030 | train | // 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
// creden... | {
"resource": ""
} | ||
c4031 | train | // 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. | {
"resource": ""
} | ||
c4032 | train | // RegisterCredentials returns any credentials that need to be registered for
// a provider. | {
"resource": ""
} | ||
c4033 | train | // NewMockAPICalls creates a new mock instance | {
"resource": ""
} | ||
c4034 | train | // ContainerConfig mocks base method | {
"resource": ""
} | ||
c4035 | train | // ContainerConfig indicates an expected call of ContainerConfig | {
"resource": ""
} | ||
c4036 | train | // GetContainerInterfaceInfo indicates an expected call of GetContainerInterfaceInfo | {
"resource": ""
} | ||
c4037 | train | // GetContainerProfileInfo mocks base method | {
"resource": ""
} | ||
c4038 | train | // HostChangesForContainer mocks base method | {
"resource": ""
} | ||
c4039 | train | // PrepareContainerInterfaceInfo mocks base method | {
"resource": ""
} | ||
c4040 | train | // ReleaseContainerAddresses mocks base method | {
"resource": ""
} | ||
c4041 | train | // SetHostMachineNetworkConfig mocks base method | {
"resource": ""
} | ||
c4042 | train | // sequence safely increments a database backed sequence, returning
// the next value. | {
"resource": ""
} | ||
c4043 | train | // 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 provide... | {
"resource": ""
} | ||
c4044 | train | // Sequences returns the model's sequence names and their next values. | {
"resource": ""
} | ||
c4045 | train | // 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 a... | {
"resource": ""
} | ||
c4046 | train | // 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. | {
"resource": ""
} | ||
c4047 | train | // Validate validates the bootstrap parameters. | {
"resource": ""
} | ||
c4048 | train | // 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. | {
"resource": ""
} | ||
c4049 | train | // Bootstrap bootstraps the given environment. The supplied constraints are
// used to provision the instance, and are also set within the bootstrapped
// environment. | {
"resource": ""
} | ||
c4050 | train | // 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 architec... | {
"resource": ""
} | ||
c4051 | train | // getBootstrapToolsVersion returns the newest tools from the given tools list. | {
"resource": ""
} | ||
c4052 | train | // setBootstrapToolsVersion updates the agent-version configuration attribute. | {
"resource": ""
} | ||
c4053 | train | // 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. | {
"resource": ""
} | ||
c4054 | train | // 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. | {
"resource": ""
} | ||
c4055 | train | // 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... | {
"resource": ""
} | ||
c4056 | train | // hashAndSize calculates and returns the SHA256 hash and the size of the file
// located at the given path. | {
"resource": ""
} | ||
c4057 | train | // NewListEndpointsCommand constructs new list endpoint command. | {
"resource": ""
} | ||
c4058 | train | // convertCharmEndpoints takes any number of charm relations and
// creates a collection of ui-formatted endpoints. | {
"resource": ""
} | ||
c4059 | train | // GetState returns a new State instance for the specified model. The
// connection uses the same credentials and policy as the Controller. | {
"resource": ""
} | ||
c4060 | train | // Ping probes the Controllers's database connection to ensure that it
// is still alive. | {
"resource": ""
} | ||
c4061 | train | // ControllerConfig returns the config values for the controller. | {
"resource": ""
} | ||
c4062 | train | // checkSpaceIsAvailableToAllControllers checks if each controller machine has
// at least one address in the input space. If not, an error is returned. | {
"resource": ""
} | ||
c4063 | train | // Supports is defined on the storage.Provider interface. | {
"resource": ""
} | ||
c4064 | train | // DefaultPools is defined on the storage.Provider interface. | {
"resource": ""
} | ||
c4065 | train | // ValidateBranchName returns an error if the input name is not suitable for
// identifying a new in-flight branch. | {
"resource": ""
} | ||
c4066 | train | // 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. | {
"resource": ""
} | ||
c4067 | train | // AddImage is defined on the Storage interface. | {
"resource": ""
} | ||
c4068 | train | // ListImages is defined on the Storage interface. | {
"resource": ""
} | ||
c4069 | train | // DeleteImage is defined on the Storage interface. | {
"resource": ""
} | ||
c4070 | train | // Image is defined on the Storage interface. | {
"resource": ""
} | ||
c4071 | train | // imagePath returns the storage path for the specified image. | {
"resource": ""
} | ||
c4072 | train | // docId returns an id for the mongo image metadata document. | {
"resource": ""
} | ||
c4073 | train | // ReadCharmURL reads a charm identity file from the supplied path. | {
"resource": ""
} | ||
c4074 | train | // WriteCharmURL writes a charm identity file into the supplied path. | {
"resource": ""
} | ||
c4075 | train | // LXDProfile returns the lxd profile of this charm. | {
"resource": ""
} | ||
c4076 | train | // NewSetFirewallRuleCommand returns a command to set firewall rules. | {
"resource": ""
} | ||
c4077 | train | // Use implements Tracker. | {
"resource": ""
} | ||
c4078 | train | // Done implements Tracker. | {
"resource": ""
} | ||
c4079 | train | // resourceID converts an external resource ID into an internal one. | {
"resource": ""
} | ||
c4080 | train | // 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. | {
"resource": ""
} | ||
c4081 | train | // newCharmStoreResourceDoc generates a doc that represents the given resource. | {
"resource": ""
} | ||
c4082 | train | // newUnitResourceDoc generates a doc that represents the given resource. | {
"resource": ""
} | ||
c4083 | train | // newResourceDoc generates a doc that represents the given resource. | {
"resource": ""
} | ||
c4084 | train | // newStagedResourceDoc generates a staging doc that represents
// the given resource. | {
"resource": ""
} | ||
c4085 | train | // resources returns the resource docs for the given application. | {
"resource": ""
} | ||
c4086 | train | // getOne returns the resource that matches the provided model ID. | {
"resource": ""
} | ||
c4087 | train | // getOnePending returns the resource that matches the provided model ID. | {
"resource": ""
} | ||
c4088 | train | // resource2doc converts the resource into a DB doc. | {
"resource": ""
} | ||
c4089 | train | // doc2resource returns the resource info represented by the doc. | {
"resource": ""
} | ||
c4090 | train | // doc2basicResource returns the resource info represented by the doc. | {
"resource": ""
} | ||
c4091 | train | // Close closes the stream. | {
"resource": ""
} | ||
c4092 | train | // Validate validates the upgrade-series worker configuration. | {
"resource": ""
} | ||
c4093 | train | // NewWorker creates, starts and returns a new upgrade-series worker based on
// the input configuration. | {
"resource": ""
} | ||
c4094 | train | // handleUpgradeSeriesChange retrieves the current upgrade-series status for
// this machine and based on the status, calls methods that will progress
// the workflow accordingly. | {
"resource": ""
} | ||
c4095 | train | // handlePrepareStarted handles workflow for the machine with an upgrade-series
// lock status of "UpgradeSeriesPrepareStarted" | {
"resource": ""
} | ||
c4096 | train | // 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. | {
"resource": ""
} | ||
c4097 | train | // transitionUnitsStarted iterates over units managed by this machine. Starts
// the unit's agent service, and transitions all unit subordinate statuses. | {
"resource": ""
} | ||
c4098 | train | // handleCompleted notifies the server that it has completed the upgrade
// workflow, then unpins leadership for applications running on the machine. | {
"resource": ""
} | ||
c4099 | train | // pinLeaders pins leadership for applications
// represented by units running on this machine. | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.