_id
stringlengths
2
7
text
stringlengths
6
2.61k
title
stringclasses
1 value
c4900
// NewSocketListener returns a new socket listener struct.
c4901
// Stop closes the listener and releases all resources // used by the socketListener.
c4902
// NewPeriodicWorker returns a periodic worker, that will call a stop function // when it is killed.
c4903
// NewWorker returns a Worker that tracks the validity of the Model's cloud // credential, as exposed by the Facade.
c4904
// FilesystemParams returns the parameters for creating or destroying the // given filesystem.
c4905
// FilesystemToState converts a params.Filesystem to state.FilesystemInfo // and names.FilesystemTag.
c4906
// FilesystemFromState converts a state.Filesystem to params.Filesystem.
c4907
// FilesystemInfoFromState converts a state.FilesystemInfo to params.FilesystemInfo.
c4908
// FilesystemAttachmentToState converts a storage.FilesystemAttachment // to a state.FilesystemAttachmentInfo.
c4909
// FilesystemAttachmentFromState converts a state.FilesystemAttachment to params.FilesystemAttachment.
c4910
// FilesystemAttachmentInfoFromState converts a state.FilesystemAttachmentInfo // to params.FilesystemAttachmentInfo.
c4911
// ParseFilesystemAttachmentIds parses the strings, returning machine storage IDs.
c4912
// API2Result converts the API result to a payload.Result.
c4913
// Payloads2TrackArgs converts the provided payload info into arguments // for the Track API endpoint.
c4914
// FullIDs2LookUpArgs converts the provided payload "full" IDs into arguments // for the LookUp API endpoint.
c4915
// IDs2SetStatusArgs converts the provided payload IDs into arguments // for the SetStatus API endpoint.
c4916
// stateStepsFor221 returns upgrade steps for Juju 2.2.1 that manipulate state directly.
c4917
// Subnets implements environs.NetworkingEnviron.
c4918
// NetworkInterfaces implements environs.NetworkingEnviron.
c4919
// findNetworkDetails looks up the network information we need to // populate an InterfaceInfo - if the interface is on a legacy network // we use information from the network because there'll be no subnet // linked.
c4920
// AllocateContainerAddresses implements environs.NetworkingEnviron.
c4921
// SSHAddresses implements environs.SSHAddresses. // For GCE we want to make sure we're returning only one public address, so that probing won't // cause SSHGuard to lock us out
c4922
// Include implements IncludeSet.
c4923
// Validate returns an error if the service value is not valid.
c4924
// Get retrieves contents stored at path and saves it to data. If nothing exists at path, // an error satisfying errors.IsNotFound is returned.
c4925
// Put stores data at path. It will be accessible later via Get. // Data already at path will is overwritten and no // revision history is saved.
c4926
// PutReader data from a an io.Reader at path. It will be accessible later via Get. // Data already at path will is overwritten and no // revision history is saved.
c4927
// WithChannel returns a ChannelAwareFakeClient with its channel // set to channel and its other values originating from this client.
c4928
// Get retrieves data from path. If nothing has been Put to // path, an error satisfying errors.IsNotFound is returned.
c4929
// AddCharm registers a charm's availability on a particular channel, // but does not upload its contents. This is part of a two stage process // for storing charms in the repository. // // In this implementation, the force parameter is ignored.
c4930
// AddCharmWithAuthorization is equivalent to AddCharm. // The macaroon parameter is ignored.
c4931
// AddLocalCharm allows you to register a charm that is not associated with a particular release channel. // Its purpose is to facilitate registering charms that have been built locally.
c4932
// CharmInfo returns information about charms that are currently in the charm store.
c4933
// Resolve disambiguates a charm to a specific revision. // // Part of the charmrepo.Interface
c4934
// Get retrieves a charm from the repository. // // Part of the charmrepo.Interface
c4935
// GetBundle retrieves a bundle from the repository. // // Part of the charmrepo.Interface
c4936
// Publish marks a charm or bundle as published within channels. // // In this implementation, the resources parameter is ignored.
c4937
// signature creates a SHA384 digest from r
c4938
// New constructs a new Storage that stores binary files in the provided // ManagedStorage, and metadata in the provided collection using the provided // transaction runner.
c4939
// Add implements Storage.Add.
c4940
// Helper method to create a firewall rule string for the given machine Id and port
c4941
// PublicKeyForLocation implements bakery.PublicKeyLocator.
c4942
// NewBakeryService returns a new bakery.Service and bakery.KeyPair. // The bakery service is identifeid by the model corresponding to the // State.
c4943
// ExpireStorageAfter implements authentication.ExpirableStorageBakeryService.
c4944
// NewContainerSetupHandler returns a StringsWatchHandler which is notified // when containers are created on the given machine.
c4945
// SetUp is defined on the StringsWatchHandler interface.
c4946
// Handle is called whenever containers change on the machine being watched. // Machines start out with no containers so the first time Handle is called, // it will be because a container has been added.
c4947
// initContainerDependencies ensures that the host machine is set-up to manage // containers of the input type.
c4948
// startProvisionerWorker kicks off a provisioner task responsible for creating // containers of the specified type on the machine.
c4949
// Validate returns an error if config cannot be expected to drive // a functional model worker manager.
c4950
// StreamDebugLog requests the specified debug log records from the // server and returns a channel of the messages that come back.
c4951
// Prepare downloads and verifies the charm, and informs the controller // that the unit will be using it. If the supplied state indicates that a // hook was pending, that hook is recorded in the returned state. // Prepare is part of the Operation interface.
c4952
// Execute installs or upgrades the prepared charm, and preserves any hook // recorded in the supplied state. // Execute is part of the Operation interface.
c4953
// Commit restores state for any interrupted hook, or queues an install or // upgrade-charm hook if no hook was interrupted.
c4954
// Updates returns the list of charm store resources corresponding to // the application's resources that are out of date. Note that there must be // a charm store resource for each of the application resources and // vice-versa. If they are out of sync then an error is returned.
c4955
// NewMockApiextensionsV1beta1Interface creates a new mock instance
c4956
// CustomResourceDefinitions mocks base method
c4957
// CustomResourceDefinitions indicates an expected call of CustomResourceDefinitions
c4958
// RESTClient mocks base method
c4959
// NewMockCustomResourceDefinitionInterface creates a new mock instance
c4960
// Validate returns error if the current is not a valid access level.
c4961
// ValidateModelAccess returns error if the passed access is not a valid // model access level.
c4962
// ValidateOfferAccess returns error if the passed access is not a valid // offer access level.
c4963
// ValidateCloudAccess returns error if the passed access is not a valid // cloud access level.
c4964
//ValidateControllerAccess returns error if the passed access is not a valid // controller access level.
c4965
// EqualOrGreaterModelAccessThan returns true if the current access is equal // or greater than the passed in access level.
c4966
// EqualOrGreaterControllerAccessThan returns true if the current access is // equal or greater than the passed in access level.
c4967
// EqualOrGreaterCloudAccessThan returns true if the current access is // equal or greater than the passed in access level.
c4968
// EqualOrGreaterOfferAccessThan returns true if the current access is // equal or greater than the passed in access level.
c4969
// NewShowCommand returns a command that shows storage details // on the specified machine
c4970
// ListSpaces lists all available spaces and their associated subnets.
c4971
// ReloadSpaces reloads spaces from substrate
c4972
// newAPIContext returns an API context that will use the given // context for user interactions when authorizing. // The returned API context must be closed after use. // // If ctxt is nil, no command-line authorization // will be supported. // // This function is provided for use by commands that cannot use // CommandBase. Most clients should use that instead.
c4973
// NewBakeryClient returns a new httpbakery.Client, using the API context's // persistent cookie jar and web page visitor.
c4974
// Close closes the API context, saving any cookies to the // persistent cookie jar.
c4975
// Cookies implements http.CookieJar.Cookies by // adding the domain cookie when the domain is non-empty.
c4976
// manifestSender sends a JSON-encoded response to the client including the // list of files contained in the charm bundle.
c4977
// archiveEntrySender returns a bundleContentSenderFunc which is responsible // for sending the contents of filePath included in the given charm bundle. If // filePath does not identify a file or a symlink, a 403 forbidden error is // returned. If serveIcon is true, then the charm icon.svg file is sent, or a // default icon if that file is not included in the charm.
c4978
// archiveSender is a bundleContentSenderFunc which is responsible for sending // the contents of the given charm bundle.
c4979
// processUploadedArchive opens the given charm archive from path, // inspects it to see if it has all files at the root of the archive // or it has subdirs. It repackages the archive so it has all the // files at the root dir, if necessary, replacing the original archive // at path.
c4980
// findArchiveRootDir scans a zip archive and returns the rootDir of // the archive, the one containing metadata.yaml, config.yaml and // revision files, or an error if the archive appears invalid.
c4981
// repackageAndUploadCharm expands the given charm archive to a // temporary directory, repackages it with the given curl's revision, // then uploads it to storage, and finally updates the state.
c4982
// sendJSONError sends a JSON-encoded error response. Note the // difference from the error response sent by the sendError function - // the error is encoded in the Error field as a string, not an Error // object.
c4983
// sendBundleContent uses the given bundleContentSenderFunc to send a // response related to the charm archive located in the given // archivePath.
c4984
// NewStorageAPI returns a storage api for the root api endpoint // that the environment command returns.
c4985
// formatStorageDetails takes a set of StorageDetail and // creates a mapping from storage ID to storage details.
c4986
// NewMockBaseWatcher creates a new mock instance
c4987
// Dead mocks base method
c4988
// Dead indicates an expected call of Dead
c4989
// WatchCollection mocks base method
c4990
// WatchCollectionWithFilter mocks base method
c4991
// WatchCollectionWithFilter indicates an expected call of WatchCollectionWithFilter
c4992
// WatchMulti mocks base method
c4993
// New returns an implementation of bakery.Storage // that stores all items in MongoDB with an expiry // time.
c4994
// getLogMessage generates a nicely formatted log message from the known peer // group information.
c4995
// initNewReplicaSet creates a new machine ID indexed map of known replica-set // members to use as the basis for a newly calculated replica-set.
c4996
// checkExtraMembers checks to see if any of the input members, identified as // not being associated with machines, is set as a voter in the peer group. // If any have, an error is returned. // The boolean indicates whether any extra members were present at all.
c4997
// reviewPeerGroupChanges adds some extra logic after creating // possiblePeerGroupChanges to safely add or remove machines, keeping the // correct odd number of voters peer structure, and preventing the primary from // demotion.
c4998
// adjustVotes removes and adds votes to the members via setVoting.
c4999
// createMembers from a list of member IDs, instantiate a new replica-set // member and add it to members map with the given ID.