_id
stringlengths
2
7
text
stringlengths
6
2.61k
title
stringclasses
1 value
c4800
// SetMongoPassword sets the password the agent responsible for the machine // should use to communicate with the controllers. Previous passwords // are invalidated.
c4801
// PasswordValid returns whether the given password is valid // for the given machine.
c4802
// ForceDestroy queues the machine for complete removal, including the // destruction of all units and containers on the machine.
c4803
// ParentId returns the Id of the host machine if this machine is a container.
c4804
// IsHasContainersError reports whether or not the error is a // HasContainersError, indicating that an attempt to destroy // a machine failed due to it having containers.
c4805
// IsHasAttachmentsError reports whether or not the error is a // HasAttachmentsError, indicating that an attempt to destroy // a machine failed due to it having storage attachments.
c4806
// Remove removes the machine from state. It will fail if the machine // is not Dead.
c4807
// Refresh refreshes the contents of the machine from the underlying // state. It returns an error that satisfies errors.IsNotFound if the // machine has been removed.
c4808
// SetAgentPresence signals that the agent for machine m is alive. // It returns the started pinger.
c4809
// InstanceId returns the provider specific instance id for this // machine, or a NotProvisionedError, if not set.
c4810
// InstanceNames returns both the provider's instance id and a user-friendly // display name. The display name is intended used for human input and // is ignored internally.
c4811
// InstanceStatus returns the provider specific instance status for this machine, // or a NotProvisionedError if instance is not yet provisioned.
c4812
// SetInstanceStatus sets the provider specific instance status for a machine.
c4813
// ModificationStatus returns the provider specific modification status for // this machine or NotProvisionedError if instance is not yet provisioned.
c4814
// AvailabilityZone returns the provier-specific instance availability // zone in which the machine was provisioned.
c4815
// ApplicationNames returns the names of applications // represented by units running on the machine.
c4816
// Units returns all the units that have been assigned to the machine.
c4817
// DesiredSpaces returns the name of all spaces that this machine needs // access to. This is the combined value of all of the direct constraints // for the machine, as well as the spaces listed for all bindings of units // being deployed to that machine.
c4818
// SetInstanceInfo is used to provision a machine and in one step sets it's // instance id, nonce, hardware characteristics, add link-layer devices and set // their addresses as needed. After, set charm profiles if needed.
c4819
// Addresses returns any hostnames and ips associated with a machine, // determined both by the machine itself, and by asking the provider. // // The addresses returned by the provider shadow any of the addresses // that the machine reported with the same address value. // Provider-reported addresses always come before machine-reported // addresses. Duplicates are removed.
c4820
// maybeGetNewAddress determines if the current address is the most appropriate // match, and if not it selects the best from the slice of all available // addresses. It returns the new address and a bool indicating if a different // one was picked.
c4821
// SetProviderAddresses records any addresses related to the machine, sourced // by asking the provider.
c4822
// ProviderAddresses returns any hostnames and ips associated with a machine, // as determined by asking the provider.
c4823
// MachineAddresses returns any hostnames and ips associated with a machine, // determined by asking the machine itself.
c4824
// CheckProvisioned returns true if the machine was provisioned with the given nonce.
c4825
// Constraints returns the exact constraints that should apply when provisioning // an instance for the machine.
c4826
// SetConstraints sets the exact constraints to apply when provisioning an // instance for the machine. It will fail if the machine is Dead, or if it // is already provisioned.
c4827
// Status returns the status of the machine.
c4828
// SetStatus sets the status of the machine.
c4829
// SupportedContainers returns any containers this machine is capable of hosting, and a bool // indicating if the supported containers have been determined or not.
c4830
// SupportsNoContainers records the fact that this machine doesn't support any containers.
c4831
// SetSupportedContainers sets the list of containers supported by this machine.
c4832
// updateSupportedContainers sets the supported containers on this host machine.
c4833
// markInvalidContainers sets the status of any container belonging to this machine // as being in error if the container type is not supported.
c4834
// SetMachineBlockDevices sets the block devices visible on the machine.
c4835
// VolumeAttachments returns the machine's volume attachments.
c4836
// AddAction is part of the ActionReceiver interface.
c4837
// CancelAction is part of the ActionReceiver interface.
c4838
// UpdateMachineSeries updates the series for the Machine.
c4839
// VerifyUnitsSeries iterates over the units with the input names, and checks // that the application for each supports the input series. // Recursion is used to verify all subordinates, with the results accrued into // a slice before returning.
c4840
// UpdateOperation returns a model operation that will update the machine.
c4841
// NewLifeGetter returns a new LifeGetter. The GetAuthFunc will be used on // each invocation of Life to determine current permissions.
c4842
// Life returns the life status of every supplied entity, where available.
c4843
// entry returns the lease name and an entry corresponding to the document. If // the document cannot be validated, it returns an error.
c4844
// newLeaseDoc returns a valid lease document encoding the supplied lease and // entry in the supplied namespace, or an error.
c4845
// Validate ensures that the spec is valid.
c4846
// TimestampGranular returns the timestamp at a resolution of 1 second.
c4847
// RevisionString returns the human-readable revision for the resource.
c4848
// AsMap returns the mapping of resource name to info for each of the // given resources.
c4849
// NewSender creates a new periodic worker that sends metrics // to a collection service.
c4850
// TabWriter returns a new tab writer with common layout definition.
c4851
// Print writes each value followed by a tab.
c4852
// Printf writes the formatted text followed by a tab.
c4853
// Println writes many tab separated values finished with a new line.
c4854
// PrintColor writes the value out in the color context specified.
c4855
// PrintStatus writes out the status value in the standard color.
c4856
// Run ensures c.Target is a unit, and resolves its address, // and connects to it via SSH to execute the debug-hooks // script.
c4857
// DestroyController sets the controller model to Dying and, if requested, // schedules cleanups so that all of the hosted models are destroyed, or // otherwise returns an error indicating that there are hosted models // remaining.
c4858
// DestroyModel sets the model to Dying, such that the model's resources will // be destroyed and the model removed from the controller.
c4859
// CAASManifolds returns a set of interdependent dependency manifolds that will // run together to administer a CAAS model, as configured.
c4860
// NewWorker returns a new worker responsible for maintaining // the raft cluster configuration.
c4861
// String returns a human readable string representation of the meter status.
c4862
// MeterStatusFromString returns a valid MeterStatusCode given a string representation.
c4863
// SetMeterStatus sets the meter status for the unit.
c4864
// createMeterStatusOp returns the operation needed to create the meter status // document associated with the given globalKey.
c4865
// removeMeterStatusOp returns the operation needed to remove the meter status // document associated with the given globalKey.
c4866
// GetMeterStatus returns the meter status for the unit.
c4867
// Start starts a new download and returns it.
c4868
// Download starts a new download, waits for it to complete, and // returns the local name of the file. The download can be aborted by // closing the Abort channel in the Request provided.
c4869
// NewMockMachineProvisioner creates a new mock instance
c4870
// AvailabilityZone mocks base method
c4871
// InstanceStatus mocks base method
c4872
// KeepInstance mocks base method
c4873
// MachineTag mocks base method
c4874
// ModelAgentVersion mocks base method
c4875
// ProvisioningInfo mocks base method
c4876
// SetCharmProfiles mocks base method
c4877
// SetInstanceInfo mocks base method
c4878
// SetInstanceInfo indicates an expected call of SetInstanceInfo
c4879
// SetStatus mocks base method
c4880
// SetStatus indicates an expected call of SetStatus
c4881
// SetSupportedContainers mocks base method
c4882
// SetSupportedContainers indicates an expected call of SetSupportedContainers
c4883
// SupportedContainers mocks base method
c4884
// WatchAllContainers mocks base method
c4885
// WatchAllContainers indicates an expected call of WatchAllContainers
c4886
// TokenResource returns a resource value suitable for auth tokens, based on // an endpoint URI.
c4887
// run the command and return the combined output.
c4888
// GetBundle mocks base method
c4889
// stringKeysFromMap takes a map with keys which are strings and returns // only the keys.
c4890
// indent prepends a format string with the given number of spaces.
c4891
// Logs returns the accumulated log data.
c4892
// Apply is part of the raft.FSM interface.
c4893
// Snapshot is part of the raft.FSM interface.
c4894
// Restore is part of the raft.FSM interface.
c4895
// Persist is part of the raft.FSMSnapshot interface.
c4896
// NewAPIAuthenticator gets the state and api info once from the // provisioner API.
c4897
// SetupAuthentication generates a random password for the given machine, // recording it via the machine's SetPassword method, and updates the // info arguments with the tag and password.
c4898
// NewAPI returns a new firewallrules API facade.
c4899
// SetFirewallRules creates or updates the specified firewall rules.