_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c21200
train
// Loads chains from config
{ "resource": "" }
c21201
train
// Saves chains to config
{ "resource": "" }
c21202
train
// Maybe allows the method call to be optional. Not calling an optional method // will not cause an error while asserting expectations
{ "resource": "" }
c21203
train
// fail fails the current test with the given formatted format and args. // In case that a test was defined, it uses the test APIs for failing a test, // otherwise it uses panic.
{ "resource": "" }
c21204
train
// AssertExpectationsForObjects asserts that everything specified with On and Return // of the specified objects was in fact called as expected. // // Calls may have occurred in any order.
{ "resource": "" }
c21205
train
// AssertExpectations asserts that everything specified with On and Return was // in fact called as expected. Calls may have occurred in any order.
{ "resource": "" }
c21206
train
// AssertNumberOfCalls asserts that the method was called expectedCalls times.
{ "resource": "" }
c21207
train
// AssertCalled asserts that the method was called. // It can produce a false result when an argument is a pointer type and the underlying value changed after calling the mocked method.
{ "resource": "" }
c21208
train
// AssertNotCalled asserts that the method was not called. // It can produce a false result when an argument is a pointer type and the underlying value changed after calling the mocked method.
{ "resource": "" }
c21209
train
// Get Returns the argument at the specified index.
{ "resource": "" }
c21210
train
// Is gets whether the objects match the arguments specified.
{ "resource": "" }
c21211
train
// Diff gets a string describing the differences between the arguments // and the specified objects. // // Returns the diff string and number of differences found.
{ "resource": "" }
c21212
train
// Assert compares the arguments with the specified objects and fails if // they do not exactly match.
{ "resource": "" }
c21213
train
// Int gets the argument at the specified index. Panics if there is no argument, or // if the argument is of the wrong type.
{ "resource": "" }
c21214
train
// Error gets the argument at the specified index. Panics if there is no argument, or // if the argument is of the wrong type.
{ "resource": "" }
c21215
train
// DirExists checks whether a directory exists in the given path. It also fails if the path is a file rather a directory or there is an error checking whether it exists.
{ "resource": "" }
c21216
train
// FailNowf fails test
{ "resource": "" }
c21217
train
// NotZero asserts that i is not the zero value for its type.
{ "resource": "" }
c21218
train
// HTTPBody is a helper that returns HTTP body of the response. It returns // empty string if building a new request fails.
{ "resource": "" }
c21219
train
// Require returns a require context for suite.
{ "resource": "" }
c21220
train
// Run takes a testing suite and runs all of the tests attached // to it.
{ "resource": "" }
c21221
train
// Filtering method according to set regular expression // specified command-line argument -m
{ "resource": "" }
c21222
train
// InEpsilonf asserts that expected and actual have a relative error less than epsilon
{ "resource": "" }
c21223
train
// NotZerof asserts that i is not the zero value for its type.
{ "resource": "" }
c21224
train
// parsePackageSource returns the types scope and the package documentation from the package
{ "resource": "" }
c21225
train
// ObjectsAreEqualValues gets whether two objects are equal, or if their // values are equal.
{ "resource": "" }
c21226
train
// formatUnequalValues takes two values of arbitrary types and returns string // representations appropriate to be presented to the user. // // If the values are not of like type, the returned strings will be prefixed // with the type name, and the value will be enclosed in parenthesis similar // to a type conversion i...
{ "resource": "" }
c21227
train
// containsKind checks if a specified kind in the slice of kinds.
{ "resource": "" }
c21228
train
// isNil checks if a specified object is nil or not, without Failing.
{ "resource": "" }
c21229
train
// didPanic returns true if the function passed to it panics. Otherwise, it returns false.
{ "resource": "" }
c21230
train
// InDeltaMapValues is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys.
{ "resource": "" }
c21231
train
// matchRegexp return true if a specified regexp matches a string.
{ "resource": "" }
c21232
train
// SCSIControllerTypes are used for adding a new SCSI controller to a VM.
{ "resource": "" }
c21233
train
// EthernetCardTypes are used for adding a new ethernet card to a VM.
{ "resource": "" }
c21234
train
// Select returns a new list containing all elements of the list for which the given func returns true.
{ "resource": "" }
c21235
train
// SelectByType returns a new list with devices that are equal to or extend the given type.
{ "resource": "" }
c21236
train
// SelectByBackingInfo returns a new list with devices matching the given backing info. // If the value of backing is nil, any device with a backing of the same type will be returned.
{ "resource": "" }
c21237
train
// Find returns the device matching the given name.
{ "resource": "" }
c21238
train
// FindByKey returns the device matching the given key.
{ "resource": "" }
c21239
train
// FindIDEController will find the named IDE controller if given, otherwise will pick an available controller. // An error is returned if the named controller is not found or not an IDE controller. Or, if name is not // given and no available controller can be found.
{ "resource": "" }
c21240
train
// CreateIDEController creates a new IDE controller.
{ "resource": "" }
c21241
train
// FindSCSIController will find the named SCSI controller if given, otherwise will pick an available controller. // An error is returned if the named controller is not found or not an SCSI controller. Or, if name is not // given and no available controller can be found.
{ "resource": "" }
c21242
train
// CreateSCSIController creates a new SCSI controller of type name if given, otherwise defaults to lsilogic.
{ "resource": "" }
c21243
train
// newSCSIBusNumber returns the bus number to use for adding a new SCSI bus device. // -1 is returned if there are no bus numbers available.
{ "resource": "" }
c21244
train
// CreateNVMEController creates a new NVMWE controller.
{ "resource": "" }
c21245
train
// newNVMEBusNumber returns the bus number to use for adding a new NVME bus device. // -1 is returned if there are no bus numbers available.
{ "resource": "" }
c21246
train
// FindDiskController will find an existing ide or scsi disk controller.
{ "resource": "" }
c21247
train
// newUnitNumber returns the unit number to use for attaching a new device to the given controller.
{ "resource": "" }
c21248
train
// AssignController assigns a device to a controller.
{ "resource": "" }
c21249
train
// CreateDisk creates a new VirtualDisk device which can be added to a VM.
{ "resource": "" }
c21250
train
// ChildDisk creates a new VirtualDisk device, linked to the given parent disk, which can be added to a VM.
{ "resource": "" }
c21251
train
// Connect changes the device to connected, returns an error if the device is not connectable.
{ "resource": "" }
c21252
train
// Disconnect changes the device to disconnected, returns an error if the device is not connectable.
{ "resource": "" }
c21253
train
// FindCdrom finds a cdrom device with the given name, defaulting to the first cdrom device if any.
{ "resource": "" }
c21254
train
// CreateCdrom creates a new VirtualCdrom device which can be added to a VM.
{ "resource": "" }
c21255
train
// InsertIso changes the cdrom device backing to use the given iso file.
{ "resource": "" }
c21256
train
// EjectIso removes the iso file based backing and replaces with the default cdrom backing.
{ "resource": "" }
c21257
train
// CreateFloppy creates a new VirtualFloppy device which can be added to a VM.
{ "resource": "" }
c21258
train
// InsertImg changes the floppy device backing to use the given img file.
{ "resource": "" }
c21259
train
// EjectImg removes the img file based backing and replaces with the default floppy backing.
{ "resource": "" }
c21260
train
// CreateSerialPort creates a new VirtualSerialPort device which can be added to a VM.
{ "resource": "" }
c21261
train
// ConnectSerialPort connects a serial port to a server or client uri.
{ "resource": "" }
c21262
train
// DisconnectSerialPort disconnects the serial port backing.
{ "resource": "" }
c21263
train
// CreateEthernetCard creates a new VirtualEthernetCard of the given name name and initialized with the given backing.
{ "resource": "" }
c21264
train
// PrimaryMacAddress returns the MacAddress field of the primary VirtualEthernetCard
{ "resource": "" }
c21265
train
// SelectBootOrder returns an ordered list of devices matching the given bootable device order
{ "resource": "" }
c21266
train
// TypeName returns the vmodl type name of the device
{ "resource": "" }
c21267
train
// Type returns a human-readable name for the given device
{ "resource": "" }
c21268
train
// Name returns a stable, human-readable name for the given device
{ "resource": "" }
c21269
train
// ConfigSpec creates a virtual machine configuration spec for // the specified operation, for the list of devices in the device list.
{ "resource": "" }
c21270
train
// NewHostCertificateManager creates a new HostCertificateManager helper
{ "resource": "" }
c21271
train
// CertificateInfo wraps the host CertificateManager certificateInfo property with the HostCertificateInfo helper. // The ThumbprintSHA1 field is set to HostSystem.Summary.Config.SslThumbprint if the host system is managed by a vCenter.
{ "resource": "" }
c21272
train
// InstallServerCertificate imports the given SSL certificate to the host system.
{ "resource": "" }
c21273
train
// ListCACertificateRevocationLists returns the SSL CRLs of Certificate Authorities that are trusted by the host system.
{ "resource": "" }
c21274
train
// ReplaceCACertificatesAndCRLs replaces the trusted CA certificates and CRL used by the host system. // These determine whether the server can verify the identity of an external entity.
{ "resource": "" }
c21275
train
// mapSession maps an HTTP cookie to a Session.
{ "resource": "" }
c21276
train
// SetSession should be called after successful authentication.
{ "resource": "" }
c21277
train
// postEvent wraps EventManager.PostEvent for internal use, with a lock on the EventManager.
{ "resource": "" }
c21278
train
// Put wraps Registry.Put, setting the moref value to include the session key.
{ "resource": "" }
c21279
train
// Get wraps Registry.Get, session-izing singleton objects such as SessionManager and the root PropertyCollector.
{ "resource": "" }
c21280
train
// DeleteDatastoreFile deletes the specified file or folder from the datastore.
{ "resource": "" }
c21281
train
// MakeDirectory creates a folder using the specified name.
{ "resource": "" }
c21282
train
// EventCategory returns the category for an event, such as "info" or "error" for example.
{ "resource": "" }
c21283
train
// errorStatus maps the given error type to a status code
{ "resource": "" }
c21284
train
// Reply composes a new Packet with the given payload or error
{ "resource": "" }
c21285
train
// FromString converts name to a FileName
{ "resource": "" }
c21286
train
// Path converts FileName to a string
{ "resource": "" }
c21287
train
// FromString converts name to a FileNameV3
{ "resource": "" }
c21288
train
// Path converts FileNameV3 to a string
{ "resource": "" }
c21289
train
// New creates an STS simulator and configures the simulator endpoint in the given settings. // The path returned is that of the settings "config.vpxd.sso.sts.uri" property.
{ "resource": "" }
c21290
train
// ServeHTTP handles STS requests.
{ "resource": "" }
c21291
train
// Device returns the VirtualMachine's config.hardware.device property.
{ "resource": "" }
c21292
train
// AddDevice adds the given devices to the VirtualMachine
{ "resource": "" }
c21293
train
// RemoveDevice removes the given devices on the VirtualMachine
{ "resource": "" }
c21294
train
// BootOptions returns the VirtualMachine's config.bootOptions property.
{ "resource": "" }
c21295
train
// SetBootOptions reconfigures the VirtualMachine with the given options.
{ "resource": "" }
c21296
train
// Answer answers a pending question.
{ "resource": "" }
c21297
train
// CreateSnapshot creates a new snapshot of a virtual machine.
{ "resource": "" }
c21298
train
// RemoveAllSnapshot removes all snapshots of a virtual machine
{ "resource": "" }
c21299
train
// RemoveSnapshot removes a named snapshot
{ "resource": "" }