_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c156500
train
// SetModelConstraints sets the constraints for the model.
{ "resource": "" }
c156501
train
// AddMachinesV2 adds new machines with the supplied parameters.
{ "resource": "" }
c156502
train
// ModelInfo returns information about the current model.
{ "resource": "" }
c156503
train
// AgentVersion returns the current version that the API server is running.
{ "resource": "" }
c156504
train
// SetModelAgentVersion sets the model agent version.
{ "resource": "" }
c156505
train
// AbortCurrentUpgrade aborts and archives the current upgrade // synchronisation record, if any.
{ "resource": "" }
c156506
train
// RetryProvisioning marks a provisioning error as transient on the machines.
{ "resource": "" }
c156507
train
// MachineManifold returns a dependency.Manifold that runs a storage provisioner.
{ "resource": "" }
c156508
train
// Validate that this Route is properly formed.
{ "resource": "" }
c156509
train
// CIDRAddress returns Address.Value combined with CIDR mask.
{ "resource": "" }
c156510
train
// filterAddrs looks at all of the addresses in allAddresses and removes ones // that line up with removeAddresses. Note that net.Addr may be just an IP or // may be a CIDR. removeAddresses should be a map of 'bridge name' to list of // addresses, so that we can report why the address was filtered.
{ "resource": "" }
c156511
train
// QuoteSpaces takes a slice of space names, and returns a nicely formatted // form so they show up legible in log messages, etc.
{ "resource": "" }
c156512
train
// firstLastAddresses returns the first and last addresses of the subnet.
{ "resource": "" }
c156513
train
// SubnetInAnyRange returns true if the subnet's address range is fully // contained in any of the specified subnet blocks.
{ "resource": "" }
c156514
train
// FormatAsCIDR converts the specified IP addresses to a slice of CIDRs. It // attempts to resolve any address represented as hostnames before formatting.
{ "resource": "" }
c156515
train
// Prepare ensures the hook can be executed. // Prepare is part of the Operation interface.
{ "resource": "" }
c156516
train
// Execute runs the hook. // Execute is part of the Operation interface.
{ "resource": "" }
c156517
train
// afterHook runs after a hook completes, or after a hook that is // not implemented by the charm is expected to have run if it were // implemented.
{ "resource": "" }
c156518
train
// Commit updates relation state to include the fact of the hook's execution, // records the impact of start and collect-metrics hooks, and queues follow-up // config-changed hooks to directly follow install and upgrade-charm hooks. // Commit is part of the Operation interface.
{ "resource": "" }
c156519
train
// getSecretKeyLoginResponsePayload returns the information required by the // client to login to the controller securely.
{ "resource": "" }
c156520
train
// NewMockLogger creates a new mock instance
{ "resource": "" }
c156521
train
// SetJujuXDGDataHome sets the value of juju home and // returns the current one.
{ "resource": "" }
c156522
train
// JujuXDGDataHomePath returns the path to a file in the // current juju home.
{ "resource": "" }
c156523
train
// JujuXDGDataHomeDir returns the directory where juju should store application-specific files
{ "resource": "" }
c156524
train
// jujuXDGDataHomeLinux returns the directory where juju should store application-specific files on Linux.
{ "resource": "" }
c156525
train
// Deploy creates all resources for controller stack.
{ "resource": "" }
c156526
train
// HostAddress returns an network.Address for the specified // hostname, depending on whether it is an IP or a resolvable // hostname. The address is given public scope.
{ "resource": "" }
c156527
train
// UpgradeModelConfig is specified in the ModelConfigUpgrader interface.
{ "resource": "" }
c156528
train
// Validate implements environs.EnvironProvider.Validate.
{ "resource": "" }
c156529
train
// ModelPayloads returns a ModelPayloads for the state's model.
{ "resource": "" }
c156530
train
// ListAll builds the list of payload information that is registered in state.
{ "resource": "" }
c156531
train
// UnitPayloads returns a UnitPayloads for the supplied unit.
{ "resource": "" }
c156532
train
// Track inserts the provided payload info in state. If the payload // is already in the DB then it is replaced.
{ "resource": "" }
c156533
train
// SetStatus updates the raw status for the identified payload to the // provided value. If the payload is missing then payload.ErrNotFound // is returned.
{ "resource": "" }
c156534
train
// Untrack removes the identified payload from state. It does not // trigger the actual destruction of the payload. If the payload is // missing then this is a noop.
{ "resource": "" }
c156535
train
// One implements Oner.
{ "resource": "" }
c156536
train
// Fetch implements Fetcher. It fetches the image file from simplestreams and // delegates writing it out and creating the qcow3 backing file to Image.write.
{ "resource": "" }
c156537
train
// Sync updates the local cached images by reading the simplestreams data and // caching if an image matching the constraints doesn't exist. It retrieves // metadata information from Oner and updates local cache via Fetcher. // A ProgressCallback can optionally be passed which will get update messages // as data is cop...
{ "resource": "" }
c156538
train
// write saves the stream to disk and updates the metadata file.
{ "resource": "" }
c156539
train
// cleanup attempts to close and remove the tempfile download image. It can be // called if things don't work out. E.g. sha256 mismatch, incorrect size...
{ "resource": "" }
c156540
train
// cleanupAll cleans up the possible backing file as well.
{ "resource": "" }
c156541
train
// NewRunner returns a Runner backed by the supplied context and paths.
{ "resource": "" }
c156542
train
// RunCommands exists to satisfy the Runner interface.
{ "resource": "" }
c156543
train
// runCommandsWithTimeout is a helper to abstract common code between run commands and // juju-run as an action
{ "resource": "" }
c156544
train
// runJujuRunAction is the function that executes when a juju-run action is ran.
{ "resource": "" }
c156545
train
// RunAction exists to satisfy the Runner interface.
{ "resource": "" }
c156546
train
// ReadModelsFile loads all models defined in a given file. // If the file is not found, it is not an error.
{ "resource": "" }
c156547
train
// addGeneration add missing generation version data if necessary. // Default to 'current'.
{ "resource": "" }
c156548
train
// addModelType adds missing model type data if necessary.
{ "resource": "" }
c156549
train
// migrateLocalModelUsers strips any @local domains from any qualified model names.
{ "resource": "" }
c156550
train
// WriteModelsFile marshals to YAML details of the given models // and writes it to the models file.
{ "resource": "" }
c156551
train
// ParseModels parses the given YAML bytes into models metadata.
{ "resource": "" }
c156552
train
// JoinOwnerModelName returns a model name qualified with the model owner.
{ "resource": "" }
c156553
train
// SplitModelName splits a qualified model name into the model and owner // name components.
{ "resource": "" }
c156554
train
// stateStepsFor232 returns upgrade steps for Juju 2.3.2 that manipulate state directly.
{ "resource": "" }
c156555
train
// Main registers subcommands for the juju-metadata executable, and hands over control // to the cmd package. This function is not redundant with main, because it // provides an entry point for testing with arbitrary command line arguments.
{ "resource": "" }
c156556
train
// NewSuperCommand creates the metadata plugin supercommand and registers the // subcommands that it supports.
{ "resource": "" }
c156557
train
// BootstrapRaft initialises the raft cluster in a controller that is // being upgraded.
{ "resource": "" }
c156558
train
// MongoVersion returns the mongo version associated with the state session.
{ "resource": "" }
c156559
train
// EnsureDead sets the Life of the subnet to Dead, if it's Alive. If the subnet // is already Dead, no error is returned. When the subnet is no longer Alive or // already removed, errNotAlive is returned.
{ "resource": "" }
c156560
train
// Remove removes a Dead subnet. If the subnet is not Dead or it is already // removed, an error is returned. On success, all IP addresses added to the // subnet are also removed.
{ "resource": "" }
c156561
train
// ProviderId returns the provider-specific id of the subnet.
{ "resource": "" }
c156562
train
// ProviderNetworkId returns the provider id of the network containing // this subnet.
{ "resource": "" }
c156563
train
// Validate validates the subnet, checking the CIDR, and VLANTag, if present.
{ "resource": "" }
c156564
train
// Refresh refreshes the contents of the Subnet from the underlying // state. It an error that satisfies errors.IsNotFound if the Subnet has // been removed.
{ "resource": "" }
c156565
train
// AddSubnet creates and returns a new subnet
{ "resource": "" }
c156566
train
// Subnet returns the subnet specified by the cidr.
{ "resource": "" }
c156567
train
// AllSubnets returns all known subnets in the model.
{ "resource": "" }
c156568
train
// ObserverFactoryMultiplexer returns an ObserverFactory which will // return a Multiplexer of all the observers instantiated from the // factories passed in.
{ "resource": "" }
c156569
train
// Join is called when the connection to the API server's WebSocket is // opened.
{ "resource": "" }
c156570
train
// RPCObserver implements Observer. It will create an // rpc.ObserverMultiplexer by calling all the Observer's RPCObserver // methods.
{ "resource": "" }
c156571
train
// Validate ensures that all the required fields have values.
{ "resource": "" }
c156572
train
// getPackageCommander is a helper function which returns the // package commands implementation for the current system.
{ "resource": "" }
c156573
train
// Execute the command specified with the args with optional stdin.
{ "resource": "" }
c156574
train
// ValidateConfig performs storage provider config validation, including // any common validation.
{ "resource": "" }
c156575
train
// RunConfigureScript connects to the specified host over // SSH, and executes the provided script which is expected // to have been returned by cloudinit ConfigureScript.
{ "resource": "" }
c156576
train
// NewMockCommitCommandAPI creates a new mock instance
{ "resource": "" }
c156577
train
// CommitBranch mocks base method
{ "resource": "" }
c156578
train
// CommitBranch indicates an expected call of CommitBranch
{ "resource": "" }
c156579
train
// NewStatusSetCommand makes a jujuc status-set command.
{ "resource": "" }
c156580
train
// matchHostArchTools filters the given list of tools to the host architecture.
{ "resource": "" }
c156581
train
// combinedCloudInitData returns a combined map of the given cloudInitData // and instance cloud init properties provided.
{ "resource": "" }
c156582
train
// firewall stuff // OpenPorts opens the given ports on the instance, which // should have been started with the given machine id.
{ "resource": "" }
c156583
train
// IngressRules returns the set of ports open on the instance, which // should have been started with the given machine id.
{ "resource": "" }
c156584
train
// NewRemoveStorageCommandWithAPI returns a command // used to remove storage from the model.
{ "resource": "" }
c156585
train
// NewUndertakerAPI creates a new instance of the undertaker API.
{ "resource": "" }
c156586
train
// WatchModelResources creates watchers for changes to the lifecycle of an // model's machines and services.
{ "resource": "" }
c156587
train
// ModelConfig returns the model's configuration.
{ "resource": "" }
c156588
train
// ControllerInfo returns the remote controller's API information.
{ "resource": "" }
c156589
train
// WatchControllerInfo returns a watcher that is notified when the remote // controller's API information changes.
{ "resource": "" }
c156590
train
// LXDProfileNames ensures that the LXD profile names are unique yet preserve // the same order as the input. It removes certain profile names from the list, // for example "default" profile name will be removed.
{ "resource": "" }
c156591
train
// IsValidName returns if the name of the lxd profile looks valid.
{ "resource": "" }
c156592
train
// ProfileRevision returns an int which is the charm revision of the given // profile name.
{ "resource": "" }
c156593
train
// ProfileReplaceRevision replaces the old revision with a new revision // in the profile.
{ "resource": "" }
c156594
train
// MatchProfileNameByApp returns the first profile which matches the provided // appName. No match returns an empty string. // Assumes there is not more than one profile for the same application.
{ "resource": "" }
c156595
train
// setUnsetUsers sets any empty user entries in the given offer URLs // to the currently logged in user.
{ "resource": "" }
c156596
train
// offersForModel group the offer URLs per model.
{ "resource": "" }
c156597
train
// EnableHTTPSListener configures LXD to listen for HTTPS requests, rather than // only via a Unix socket. Attempts to listen on all protocols, but falls back // to IPv4 only if IPv6 has been disabled with in kernel. // Returns an error if updating the server configuration fails.
{ "resource": "" }
c156598
train
// EnsureIPv4 retrieves the network for the input name and checks its IPv4 // configuration. If none is detected, it is set to "auto". // The boolean return indicates if modification was necessary.
{ "resource": "" }
c156599
train
// GetNICsFromProfile returns all NIC devices in the profile with the input // name. All returned devices have a MAC address; generated if required.
{ "resource": "" }