anchor dict | positive dict | negative dict |
|---|---|---|
{
"audio": "",
"image": "",
"text": "func (a *UnitAgent) Run(ctx *cmd.Context) (err error) {\n\tdefer a.Done(err)\n\tif err := a.ReadConfig(a.Tag().String()); err != nil {\n\t\treturn err\n",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\t}\n\tsetupAgentLogging(a.CurrentConfig())\n\n\ta.runner.StartWorker(\"api\", a.APIWorkers)\n\terr = cmdutil.AgentDone(logger, a.runner.Wait())\n\treturn err\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\t\treturn err\n\t}\n\n\ta.Timestamps, err = TimeArrayDecodeAll(tb, a.Timestamps)\n\tif err != nil {\n\t\treturn err\n\t}\n\ta.Values, err = UnsignedArrayDecodeAll(vb, a.Values)\n\treturn err\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (a *UnitAgent) APIWorkers() (worker.Worker, error) {\n\tupdateAgentConfLogging := func(loggingConfig string) error {\n\t\treturn a.AgentConf.ChangeConfig(func(setter agent.ConfigSetter) error {\n\t\t\tsetter.SetLoggingConfig(loggingConfig)\n\t\t\treturn nil\n\t\t})\n\t}\n... | {
"audio": "",
"image": "",
"text": "\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif err := dependency.Install(engine, manifolds); err != nil {\n\t\tif err := worker.Stop(engine); err != nil {\n\t\t\tlogger.Errorf(\"while stopping engine with bad manifolds: %v\", err)\n\t\t}\n\t\treturn nil, err\n\t}\n\tif er... | {
"audio": "",
"image": "",
"text": " them\")\n\t\t\tif err := a.proxyManager.Kill(); err != nil {\n\t\t\t\ta.logger.Printf(\"[WARN] agent: error shutting down proxy manager: %s\", err)\n\t\t\t}\n\t\t} else {\n\t\t\tif err := a.proxyManager.Close(); err != nil {\n\t\t\t\ta.logger.Printf(\"[WARN] agent: error shut... |
{
"audio": "",
"image": "",
"text": "func NewStateCrossControllerAPI(ctx facade.Context) (*CrossControllerAPI, error) {\n\tst := ctx.State()\n\treturn NewCrossControllerAPI(\n\t\tctx.Resources(),\n\t\tfunc() ([]string, string,",
"video": ""
} | {
"audio": "",
"image": "",
"text": " error) { return common.StateControllerInfo(st) },\n\t\tst.WatchAPIHostPortsForClients,\n\t)\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " func(ctx context.Context) error {\n\t\treturn UpdateTenant(ctx, config)\n\t}\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func NewCrossControllerAPI(\n\tresources facade.Resources,\n\tlocalControllerInfo localControllerInfoFunc,\n\twatchLocalControllerInfo watchLocalControllerInfoFunc,\n) (*CrossControllerAPI, error) {\n\treturn &CrossControllerAPI{\n\t\tresources: ",
"video": ""
} | {
"audio": "",
"image": "",
"text": " resources,\n\t\tlocalControllerInfo: localControllerInfo,\n\t\twatchLocalControllerInfo: watchLocalControllerInfo,\n\t}, nil\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\t\t\treturn authorizer.AuthOwner(tag)\n\t\t}, nil\n\t}\n\taccessUnit := func() (common.AuthFunc, error) {\n\t\treturn func(tag names.Tag) bool {\n\t\t\treturn false\n\t\t}, nil\n\t}\n\n\treturn &API{\n\t\tst: st,\n\t\tresources: resources,\n\t\t... |
{
"audio": "",
"image": "",
"text": "func (api *CrossControllerAPI) WatchControllerInfo() (params.NotifyWatchResults, error) {\n\tresults := params.NotifyWatchResults{\n\t\tResults: make([]params.NotifyWatchResult, 1),\n\t}\n\tw := api.watchLocalControllerInfo()\n\tif _, ok := <-w.Changes(); !ok {\n\t\tresults.Re... | {
"audio": "",
"image": "",
"text": " = common.ServerError(watcher.EnsureErr(w))\n\t\treturn results, nil\n\t}\n\tresults.Results[0].NotifyWatcherId = api.resources.Register(w)\n\treturn results, nil\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\t}\n\tif len(results.Results) != 1 {\n\t\treturn params.ControllersChanges{}, errors.Errorf(\"expected 1 result, got %d\", len(results.Results))\n\t}\n\tresult := results.Results[0]\n\tif result.Error != nil {\n\t\treturn params.ControllersChanges{}, result.Error\n\t}\n\tretu... |
{
"audio": "",
"image": "",
"text": "func (api *CrossControllerAPI) ControllerInfo() (params.ControllerAPIInfoResults, error) {\n\tresults := params.ControllerAPIInfoResults{\n\t\tResults: make([]params.ControllerAPIInfoResult, 1),\n\t}\n\taddrs, caCert, err := api.localControllerInfo()\n\tif err != nil {\n\t\tre... | {
"audio": "",
"image": "",
"text": " = common.ServerError(err)\n\t\treturn results, nil\n\t}\n\tresults.Results[0].Addresses = addrs\n\tresults.Results[0].CACert = caCert\n\treturn results, nil\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\t}\n\tif len(results.Results) != 1 {\n\t\treturn params.ControllersChanges{}, errors.Errorf(\"expected 1 result, got %d\", len(results.Results))\n\t}\n\tresult := results.Results[0]\n\tif result.Error != nil {\n\t\treturn params.ControllersChanges{}, result.Error\n\t}\n\tretu... |
{
"audio": "",
"image": "",
"text": "func NewContextAPI(apiClient APIClient, dataDir string)",
"video": ""
} | {
"audio": "",
"image": "",
"text": " *Context {\n\treturn &Context{\n\t\tapiClient: apiClient,\n\t\tdataDir: dataDir,\n\t}\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\t\tc.stopCh = nil\n\t}\n\n\t// Destroy the session explicitly\n\tsession := c.apiclient.Session()\n\t_, err := session.Destroy(c.sessionID, nil)\n\treturn err\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (c *Context) Download(name string) (string, error) {\n\tdeps := &contextDeps{\n\t\tAPIClient: c.apiClient,\n\t\tname: name,\n\t\tdataDir: c.dataDir,\n\t}\n\tpath,",
"video": ""
} | {
"audio": "",
"image": "",
"text": " err := internal.ContextDownload(deps)\n\tif err != nil {\n\t\treturn \"\", errors.Trace(err)\n\t}\n\treturn path, nil\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\t\tfilepath.Walk(rootPath, func(path string, info os.FileInfo, err error) error {\n\t\t\t\tmatched, err := filepath.Match(\"*.json\", info.Name())\n\t\t\t\tif err != nil {\n\t\t\t\t\twarn(err)\n\t\t\t\t\treturn nil\n\t\t\t\t}\n\t\t\t\tif matched {\n\t\t\t\t\tc <- path\n\t\t\t... |
{
"audio": "",
"image": "",
"text": "func attachmentLife(ctx *context, ids []params.MachineStorageId) (\n\talive, dying, dead []params.MachineStorageId, _ error,\n) {\n\tlifeResults, err := ctx.config.Life.AttachmentLife(ids)\n\tif err != nil {\n\t\treturn nil, nil, nil, errors.Annotate(err, \"getting machine att... | {
"audio": "",
"image": "",
"text": " %s\",\n\t\t\t\t\tids[i].AttachmentTag, ids[i].MachineTag,\n\t\t\t\t)\n\t\t\t}\n\t\t\tlife = params.Dead\n\t\t}\n\t\tswitch life {\n\t\tcase params.Alive:\n\t\t\talive = append(alive, ids[i])\n\t\tcase params.Dying:\n\t\t\tdying = append(dying, ids[i])\n\t\tcase params.Dead:\n... | {
"audio": "",
"image": "",
"text": "\t\tif statusInfo.Status != status.Error && statusInfo.Status != status.ProvisioningError {\n\t\t\tcontinue\n\t\t}\n\t\t// Transient errors are marked as such in the status data.\n\t\tif transient, ok := result.Data[\"transient\"].(bool); !ok || !transient {\n\t\t\tcontinue\n\... |
{
"audio": "",
"image": "",
"text": "func removeEntities(ctx *context, tags []names.Tag) error {\n\tif len(tags) == 0 {\n\t\treturn nil\n\t}\n\tlogger.Debugf(\"removing entities: %v\", tags)\n\terrorResults, err := ctx.config.Life.Remove(tags)\n\tif err != nil {\n\t\treturn errors.Annotate(err, \"removing storage... | {
"audio": "",
"image": "",
"text": " result := range errorResults {\n\t\tif result.Error != nil {\n\t\t\treturn errors.Annotatef(result.Error, \"removing %s from state\", names.ReadableString(tags[i]))\n\t\t}\n\t}\n\treturn nil\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " error) {\n\tvar tags []string\n\tif tag != \"\" {\n\t\ttags = []string{tag}\n\t}\n\treturn h.service(service, tags, passingOnly, q, true)\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func removeAttachments(ctx *context, ids []params.MachineStorageId) error {\n\tif len(ids) == 0 {\n\t\treturn nil\n\t}\n\terrorResults, err := ctx.config.Life.RemoveAttachments(ids)\n\tif err != nil {\n\t\treturn errors.Annotate(err, \"removing attachments\")\n\t}\n\tfor i, re... | {
"audio": "",
"image": "",
"text": " && !params.IsCodeNotFound(result.Error) {\n\t\t\t// ignore not found error.\n\t\t\treturn errors.Annotatef(\n\t\t\t\tresult.Error, \"removing attachment of %s to %s from state\",\n\t\t\t\tids[i].AttachmentTag, ids[i].MachineTag,\n\t\t\t)\n\t\t}\n\t}\n\treturn nil\n}",
"vide... | {
"audio": "",
"image": "",
"text": " storagecommon.BlockDeviceFromState(stateBlockDevice), nil\n\t}\n\tfor i, arg := range args.Ids {\n\t\tvar result params.BlockDeviceResult\n\t\tblockDevice, err := one(arg)\n\t\tif err != nil {\n\t\t\tresult.Error = common.ServerError(err)\n\t\t} else {\n\t\t\tresult.Result = ... |
{
"audio": "",
"image": "",
"text": "func setStatus(ctx *context, statuses []params.EntityStatusArgs) {\n\tif len(statuses) > 0 {\n\t\tif err := ctx.config.Status.SetStatus(statuses); err",
"video": ""
} | {
"audio": "",
"image": "",
"text": " != nil {\n\t\t\tlogger.Errorf(\"failed to set status: %v\", err)\n\t\t}\n\t}\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\t}\n\tm.mutex.RUnlock()\n\n\tstatuses := models.ControllerStatuses{}\n\tfor _, c := range controllers {\n\t\tstatuses = append(statuses, c.GetStatusModel())\n\t}\n\n\treturn statuses\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func NewNonCanonicalArchivePaths(rootDir string) ArchivePaths {\n\treturn ArchivePaths{\n\t\tContentDir: filepath.Join(rootDir, contentDir),\n\t\tFilesBundle: filepath.Join(rootDir, contentDir, filesBundle),\n\t",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\tDBDumpDir: filepath.Join(rootDir, contentDir, dbDumpDir),\n\t\tMetadataFile: filepath.Join(rootDir, contentDir, metadataFile),\n\t}\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " {\n\treturn filepath.Join(n.RootDir, \"peers\", p.ID())\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func NewArchiveWorkspaceReader(archive io.Reader) (*ArchiveWorkspace, error) {\n\tws, err := newArchiveWorkspace()\n",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\tif err != nil {\n\t\treturn nil, errors.Trace(err)\n\t}\n\terr = unpackCompressedReader(ws.RootDir, archive)\n\treturn ws, errors.Trace(err)\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " r.Reader.(io.Closer); ok {\n\t\treturn c.Close()\n\t}\n\treturn nil\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (ws *ArchiveWorkspace) Close() error {\n\terr :=",
"video": ""
} | {
"audio": "",
"image": "",
"text": " os.RemoveAll(ws.RootDir)\n\treturn errors.Trace(err)\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\tOnStop: func(_ context.Context) error {\n\t\t\treturn p.Close()\n\t\t},\n\t})\n\treturn p\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (ws *ArchiveWorkspace) UnpackFilesBundle(targetRoot string) error {\n\ttarFile, err := os.Open(ws.FilesBundle)\n\tif err != nil {\n\t\treturn",
"video": ""
} | {
"audio": "",
"image": "",
"text": " errors.Trace(err)\n\t}\n\tdefer tarFile.Close()\n\n\terr = tar.UntarFiles(tarFile, targetRoot)\n\treturn errors.Trace(err)\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " ws := range w.resuming {\n\t\tif ws != nil {\n\t\t\t<-ws.donec\n\t\t}\n\t}\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (ws *ArchiveWorkspace) OpenBundledFile(filename string) (io.Reader, error) {\n\tif filepath.IsAbs(filename) {\n\t\treturn nil, errors.Errorf(\"filename must be relative, got %q\", filename)\n\t}\n\n\ttarFile, err := os.Open(ws.FilesBundle)\n\tif err != nil {\n\t",
"vide... | {
"audio": "",
"image": "",
"text": "\treturn nil, errors.Trace(err)\n\t}\n\n\t_, file, err := tar.FindFile(tarFile, filename)\n\tif err != nil {\n\t\ttarFile.Close()\n\t\treturn nil, errors.Trace(err)\n\t}\n\treturn file, nil\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\t}\n\tfilename := \"\"\n\tif hasDestinationFilename {\n\t\tfilename = dest\n\t} else {\n\t\t// try to assert\n\t\tre := regexp.MustCompile(\"[^/]+$\") //everything after last slash\n\n\t\tif results := re.FindAllString(path, -1); len(results) > 0 {\n\t\t\tfilename = results[l... |
{
"audio": "",
"image": "",
"text": "func (ws *ArchiveWorkspace) Metadata() (*Metadata, error) {\n\tmetaFile, err := os.Open(ws.MetadataFile)\n\tif",
"video": ""
} | {
"audio": "",
"image": "",
"text": " err != nil {\n\t\treturn nil, errors.Trace(err)\n\t}\n\tdefer metaFile.Close()\n\n\tmeta, err := NewMetadataJSONReader(metaFile)\n\treturn meta, errors.Trace(err)\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " ws := range w.resuming {\n\t\tif ws != nil {\n\t\t\t<-ws.donec\n\t\t}\n\t}\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func NewArchiveDataReader(r io.Reader) (*ArchiveData, error) {\n\tgzr, err := gzip.NewReader(r)\n\tif err != nil {\n\t\treturn nil, errors.Trace(err)\n\t}\n\tdefer gzr.Close()\n\n",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\tdata, err := ioutil.ReadAll(gzr)\n\tif err != nil {\n\t\treturn nil, errors.Trace(err)\n\t}\n\n\treturn NewArchiveData(data), nil\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\t\t\t\treturn nil, probe.NewError(e)\n\t\t\t}\n\t\t\tdefer r.Close()\n\t\t} else if strings.Contains(ctype, \"bzip\") {\n\t\t\tdefer r.Close()\n\t\t\tr = ioutil.NopCloser(bzip2.NewReader(r))\n\t\t} else {\n\t\t\tdefer r.Close()\n\t\t}\n\t}\n\tbr := bufio.NewReader(r)\n\tline,... |
{
"audio": "",
"image": "",
"text": "func (ad *ArchiveData) Metadata() (*Metadata, error) {\n\tbuf := ad.NewBuffer()\n\t_, metaFile, err := tar.FindFile(buf, ad.MetadataFile)",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\tif err != nil {\n\t\treturn nil, errors.Trace(err)\n\t}\n\n\tmeta, err := NewMetadataJSONReader(metaFile)\n\treturn meta, errors.Trace(err)\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " ad.GetMysqlDuration().Duration\n\t\treturn types.CompareInt64(int64(l), int64(r))\n\tcase types.KindMysqlEnum:\n\t\tl, r := row.GetEnum(colIdx).Value, ad.GetMysqlEnum().Value\n\t\treturn types.CompareUint64(l, r)\n\tcase types.KindMysqlSet:\n\t\tl, r := row.GetSet(colIdx).Val... |
{
"audio": "",
"image": "",
"text": "func (ad *ArchiveData) Version() (*version.Number, error) {\n\tmeta, err := ad.Metadata()\n\tif errors.IsNotFound(err) {\n\t\treturn &legacyVersion, nil\n\t}\n",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\tif err != nil {\n\t\treturn nil, errors.Trace(err)\n\t}\n\n\treturn &meta.Origin.Version, nil\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " ad.GetMysqlDuration().Duration\n\t\treturn types.CompareInt64(int64(l), int64(r))\n\tcase types.KindMysqlEnum:\n\t\tl, r := row.GetEnum(colIdx).Value, ad.GetMysqlEnum().Value\n\t\treturn types.CompareUint64(l, r)\n\tcase types.KindMysqlSet:\n\t\tl, r := row.GetSet(colIdx).Val... |
{
"audio": "",
"image": "",
"text": "func searchHook(charmDir, hook string) (string, error) {\n\thookFile := filepath.Join(charmDir, hook)\n\tif jujuos.HostOS() != jujuos.Windows {\n\t\t// we are not running on windows,\n\t\t// there is no need to look for suffixed hooks\n\t\treturn lookPath(hookFile)\n\t}",
"v... | {
"audio": "",
"image": "",
"text": "\n\tfor _, suffix := range windowsSuffixOrder {\n\t\tfile := fmt.Sprintf(\"%s%s\", hookFile, suffix)\n\t\tfoundHook, err := lookPath(file)\n\t\tif err != nil {\n\t\t\tif charmrunner.IsMissingHookError(err) {\n\t\t\t\t// look for next suffix\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tre... | {
"audio": "",
"image": "",
"text": " fmt.Errorf(\"cannot stat hook %v: %v\", vthook, err)\n\t}\n\n\t// Configure the command.\n\tlog.Infof(\"hook: executing hook: %v %v\", vthook, strings.Join(hook.Parameters, \" \"))\n\tcmd := exec.Command(vthook, hook.Parameters...)\n\tif len(hook.ExtraEnv) > 0 {\n\t\tcmd.Env ... |
{
"audio": "",
"image": "",
"text": "func (p *ProvisionerAPI) ProvisioningInfo(args params.Entities) (params.ProvisioningInfoResults, error) {\n\tresult := params.ProvisioningInfoResults{\n\t\tResults: make([]params.ProvisioningInfoResult, len(args.Entities)),\n\t}\n\tcanAccess, err := p.getAuthFunc()\n\tif err !... | {
"audio": "",
"image": "",
"text": " != nil {\n\t\t\tresult.Results[i].Error = common.ServerError(common.ErrPerm)\n\t\t\tcontinue\n\t\t}\n\t\tmachine, err := p.getMachine(canAccess, tag)\n\t\tif err == nil {\n\t\t\tresult.Results[i].Result, err = p.getProvisioningInfo(machine, env)\n\t\t}\n\t\tresult.Results[i].... | {
"audio": "",
"image": "",
"text": " p.AdminPassword == \"\" {\n\t\treturn errors.NotValidf(\"empty AdminPassword\")\n\t}\n\tif err := validateCloud(p.Cloud); err != nil {\n\t\treturn errors.Annotate(err, \"validating cloud\")\n\t}\n\tif _, err := validateCloudRegion(p.Cloud, p.ControllerModelArgs.CloudRegion); ... |
{
"audio": "",
"image": "",
"text": "func (p *ProvisionerAPI) machineTags(m *state.Machine, jobs []multiwatcher.MachineJob) (map[string]string, error) {\n\t// Names of all units deployed to the machine.\n\t//\n\t// TODO(axw) 2015-06-02 #1461358\n\t// We need a worker that periodically updates\n\t// instance tags ... | {
"audio": "",
"image": "",
"text": "\n\t\tif !unit.IsPrincipal() {\n\t\t\tcontinue\n\t\t}\n\t\tunitNames = append(unitNames, unit.Name())\n\t}\n\tsort.Strings(unitNames)\n\n\tcfg, err := p.m.ModelConfig()\n\tif err != nil {\n\t\treturn nil, errors.Trace(err)\n\t}\n\tcontrollerCfg, err := p.st.ControllerConfig()\... | {
"audio": "",
"image": "",
"text": "\tif !ok {\n\t\tw.logError(\"programming error, value not of type unitLXDProfileRemove\")\n\t\treturn\n\t}\n\n\tapp, ok := w.applications[rUnit.appName]\n\tif !ok {\n\t\tw.logError(\"programming error, unit removed before being added, application name not found\")\n\t\treturn\... |
{
"audio": "",
"image": "",
"text": "func (p *ProvisionerAPI) machineSubnetsAndZones(m *state.Machine) (map[string][]string, error) {\n\tmcons, err := m.Constraints()\n\tif err != nil {\n\t\treturn nil, errors.Annotate(err, \"cannot get machine constraints\")\n\t}\n\tincludeSpaces := mcons.IncludeSpaces()\n\tif l... | {
"audio": "",
"image": "",
"text": " := range subnets {\n\t\twarningPrefix := fmt.Sprintf(\n\t\t\t\"not using subnet %q in space %q for machine %q provisioning: \",\n\t\t\tsubnet.CIDR(), spaceName, m.Id(),\n\t\t)\n\t\tproviderId := subnet.ProviderId()\n\t\tif providerId == \"\" {\n\t\t\tlogger.Warningf(warningPr... | {
"audio": "",
"image": "",
"text": "\n\tif err := st.db().RunTransaction(ops); err == txn.ErrAborted {\n\t\tif _, err := st.Space(name); err == nil {\n\t\t\treturn nil, errors.AlreadyExistsf(\"space %q\", name)\n\t\t}\n\t\tfor _, subnetId := range subnets {\n\t\t\tsubnet, err := st.Subnet(subnetId)\n\t\t\tif err... |
{
"audio": "",
"image": "",
"text": "func (p *ProvisionerAPI) machineLXDProfileNames(m *state.Machine, env environs.Environ) ([]string, error) {\n\tprofileEnv, ok := env.(environs.LXDProfiler)\n\tif !ok {\n\t\tlogger.Tracef(\"LXDProfiler not implemented by environ\")\n\t\treturn nil, nil\n\t}\n\tunits, err := m.U... | {
"audio": "",
"image": "",
"text": " != nil {\n\t\t\treturn nil, errors.Trace(err)\n\t\t}\n\t\tch, _, err := app.Charm()\n\t\tif err != nil {\n\t\t\treturn nil, errors.Trace(err)\n\t\t}\n\t\tprofile := ch.LXDProfile()\n\t\tif profile == nil || (profile != nil && profile.Empty()) {\n\t\t\tcontinue\n\t\t}\n\t\tpNa... | {
"audio": "",
"image": "",
"text": " hash.String()\n\t\tunit, ok := hashToUnit[stringHash]\n\t\tif !ok {\n\t\t\tlog.Errorf(\"did not find Unit %v in list of all units\", stringHash)\n\t\t\treturn nil\n\t\t}\n\t\treturn unit\n\t}\n\n\tunits := make([]job.Unit, 0)\n\tfor _, dir := range res.Node.Nodes {\n\t\tu, er... |
{
"audio": "",
"image": "",
"text": "func (p *ProvisionerAPI) availableImageMetadata(m *state.Machine, env environs.Environ) ([]params.CloudImageMetadata, error) {\n\timageConstraint, err := p.constructImageConstraint(m, env)\n\tif err != nil {\n\t\treturn nil, errors.Annotate(err, \"could not construct image con... | {
"audio": "",
"image": "",
"text": " err := p.findImageMetadata(imageConstraint, env)\n\tif err != nil {\n\t\treturn nil, errors.Trace(err)\n\t}\n\tsort.Sort(metadataList(data))\n\tlogger.Debugf(\"available image metadata for provisioning: %v\", data)\n\treturn data, nil\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " *Plot {\n\tp.env.data = data\n\treturn p\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (p *ProvisionerAPI) constructImageConstraint(m *state.Machine, env environs.Environ) (*imagemetadata.ImageConstraint, error) {\n\tlookup := simplestreams.LookupParams{\n\t\tSeries: []string{m.Series()},\n\t\tStream: env.Config().ImageStream(),\n\t}\n\n\tmcons, err := m.Co... | {
"audio": "",
"image": "",
"text": "\n\t\t// metadata specific to this region.\n\t\tspec, err := hasRegion.Region()\n\t\tif err != nil {\n\t\t\t// can't really find images if we cannot determine cloud region\n\t\t\t// TODO (anastasiamac 2015-12-03) or can we?\n\t\t\treturn nil, errors.Annotate(err, \"getting pro... | {
"audio": "",
"image": "",
"text": "\t\t}\n\t\t}\n\t}\n\t{\n\t\tp, ok := m.Oneof.(*SecurityDefinitionsItem_Oauth2ApplicationSecurity)\n\t\tif ok {\n\t\t\t_, err := p.Oauth2ApplicationSecurity.ResolveReferences(root)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t}\n\t}\n\t{\n\t\tp, ok := m.Oneof.(... |
{
"audio": "",
"image": "",
"text": "func (p *ProvisionerAPI) findImageMetadata(imageConstraint *imagemetadata.ImageConstraint, env environs.Environ) ([]params.CloudImageMetadata, error) {\n\t// Look for image metadata in state.\n\tstateMetadata, err := p.imageMetadataFromState(imageConstraint)\n\tif err != nil &... | {
"audio": "",
"image": "",
"text": " %d metadata\", len(stateMetadata))\n\t// No need to look in data sources if found in state.\n\tif len(stateMetadata) != 0 {\n\t\treturn stateMetadata, nil\n\t}\n\n\t// If no metadata is found in state, fall back to original simple stream search.\n\t// Currently, an image meta... | {
"audio": "",
"image": "",
"text": " nil {\n\t\t\ttriggerImageRef = buildutil.GetInputReference(bc.Spec.Strategy)\n\t\t}\n\t\tif triggerImageRef == nil {\n\t\t\tklog.Warningf(\"Could not get ImageStream reference for default ImageChangeTrigger on BuildConfig %s/%s\", bc.Namespace, bc.Name)\n\t\t\tcontinue\n\t\t}... |
{
"audio": "",
"image": "",
"text": "func (p *ProvisionerAPI) imageMetadataFromState(constraint *imagemetadata.ImageConstraint) ([]params.CloudImageMetadata, error) {\n\tfilter := cloudimagemetadata.MetadataFilter{\n\t\tSeries: constraint.Series,\n\t\tArches: constraint.Arches,\n\t\tRegion: constraint.Region,\n\t... | {
"audio": "",
"image": "",
"text": " m.Series,\n\t\t\tArch: m.Arch,\n\t\t\tVirtType: m.VirtType,\n\t\t\tRootStorageType: m.RootStorageType,\n\t\t\tRootStorageSize: m.RootStorageSize,\n\t\t\tSource: m.Source,\n\t\t\tPriority: m.Priority,\n\t\t}\n\t}\n\n\tvar all []params.Clo... | {
"audio": "",
"image": "",
"text": " {\n\treturn func(p *Prompt) error {\n\t\tp.keyBindMode = m\n\t\treturn nil\n\t}\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (p *ProvisionerAPI) imageMetadataFromDataSources(env environs.Environ, constraint *imagemetadata.ImageConstraint) ([]params.CloudImageMetadata, error) {\n\tsources, err := environs.ImageMetadataSources(env)\n\tif err != nil {\n\t\treturn nil, errors.Trace(err)\n\t}\n\n\tc... | {
"audio": "",
"image": "",
"text": " info.Source, source.Priority()))\n\t\t}\n\t}\n\tif len(metadataState) > 0 {\n\t\tif err := p.st.CloudImageMetadataStorage.SaveMetadata(metadataState); err != nil {\n\t\t\t// No need to react here, just take note\n\t\t\tlogger.Warningf(\"failed to save published image metadata... | {
"audio": "",
"image": "",
"text": " err := c.facade.RawAPICaller().BakeryClient().DischargeAll(info.Macaroon)\n\tif err == nil && logger.IsTraceEnabled() {\n\t\tlogger.Tracef(\"discharge macaroon ids:\")\n\t\tfor _, m := range ms {\n\t\t\tlogger.Tracef(\" - %v\", m.Id())\n\t\t}\n\t}\n\tif err != nil {\n\t\tret... |
{
"audio": "",
"image": "",
"text": "func (m metadataList) Less(i, j int) bool {\n\treturn",
"video": ""
} | {
"audio": "",
"image": "",
"text": " m[i].Priority < m[j].Priority\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " func(i int) bool {\n\t\treturn !results.vertices[i].less(results.config, result)\n\t})\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func NewHTTPBlobOpener(hostnameVerification utils.SSLHostnameVerification) func(*url.URL) (io.ReadCloser, error) {\n\treturn func(url *url.URL) (io.ReadCloser, error) {\n\t\t// TODO(rog) make the download operation interruptible.\n\t\tclient := utils.GetHTTPClient(hostnameVeri... | {
"audio": "",
"image": "",
"text": "\tresp, err := client.Get(url.String())\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif resp.StatusCode != http.StatusOK {\n\t\t\t// resp.Body is always non-nil. (see https://golang.org/pkg/net/http/#Response)\n\t\t\tresp.Body.Close()\n\t\t\treturn nil, errors.Error... | {
"audio": "",
"image": "",
"text": " (HashTree, error) {\n\treturn getHashTree(storageRoot, func(w io.Writer) error {\n\t\treturn pachClient.GetTag(treeRef.Name, w)\n\t})\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func NewSha256Verifier(expected string) func(*os.File) error {\n\treturn func(file *os.File) error {\n\t\tactual, _, err := utils.ReadSHA256(file)\n\t\tif err != nil {\n\t\t\treturn errors.Trace(err)\n\t\t}\n\t\tif",
"video": ""
} | {
"audio": "",
"image": "",
"text": " actual != expected {\n\t\t\terr := errors.Errorf(\"expected sha256 %q, got %q\", expected, actual)\n\t\t\treturn errors.NewNotValid(err, \"\")\n\t\t}\n\t\treturn nil\n\t}\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " := pkg.NewTgzWalker(jr)\n\tjw.OnMatch(\"job.MF\", func(file pkg.FileEntry) error {\n\t\treturn decodeYaml(file.Reader, &job)\n\t})\n\terr := jw.Walk()\n\treturn job, err\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (s *Application) Refresh() error {\n\tlife, err := s.st.life(s.tag)\n\tif err != nil {\n\t",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\treturn err\n\t}\n\ts.life = life\n\treturn nil\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " authorizeWriteScraper(ctx, st.OrgID, id); err != nil {\n\t\treturn err\n\t}\n\n\treturn s.s.RemoveTarget(ctx, id)\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (s *Application) CharmModifiedVersion() (int, error) {\n\tvar results params.IntResults\n\targs := params.Entities{\n\t\tEntities: []params.Entity{{Tag: s.tag.String()}},\n\t}\n\terr := s.st.facade.FacadeCall(\"CharmModifiedVersion\", args, &results)\n\tif err != nil {\n\... | {
"audio": "",
"image": "",
"text": " len(results.Results) != 1 {\n\t\treturn -1, fmt.Errorf(\"expected 1 result, got %d\", len(results.Results))\n\t}\n\tresult := results.Results[0]\n\tif result.Error != nil {\n\t\treturn -1, result.Error\n\t}\n\n\treturn result.Result, nil\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\t}\n\tvar results params.ErrorResults\n\terr := st.facade.FacadeCall(\"SetMachineBlockDevices\", args, &results)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn results.OneError()\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (s *Application) SetStatus(unitName string, appStatus status.Status, info string, data map[string]interface{}) error {\n\ttag := names.NewUnitTag(unitName)\n\tvar result params.ErrorResults\n\targs := params.SetStatus{\n\t\tEntities: []params.EntityStatusArgs{\n\t\t\t{\n\... | {
"audio": "",
"image": "",
"text": " data,\n\t\t\t},\n\t\t},\n\t}\n\terr := s.st.facade.FacadeCall(\"SetApplicationStatus\", args, &result)\n\tif err != nil {\n\t\treturn errors.Trace(err)\n\t}\n\treturn result.OneError()\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " unit)\n\t\t\t}\n\t\t\tentities[i].Tag = names.NewUnitTag(unit).String()\n\t\t}\n\t\targs.Tags = params.Entities{Entities: entities}\n\t}\n\n\tresults := new(params.ErrorResults)\n\terr := c.facade.FacadeCall(\"ResolveUnitErrors\", args, results)\n\tif err != nil {\n\t\treturn... |
{
"audio": "",
"image": "",
"text": "func (s *Application) Status(unitName string) (params.ApplicationStatusResult, error) {\n\ttag := names.NewUnitTag(unitName)\n\tvar results params.ApplicationStatusResults\n\targs := params.Entities{\n\t\tEntities: []params.Entity{\n\t",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\t\t{\n\t\t\t\tTag: tag.String(),\n\t\t\t},\n\t\t},\n\t}\n\terr := s.st.facade.FacadeCall(\"ApplicationStatus\", args, &results)\n\tif err != nil {\n\t\treturn params.ApplicationStatusResult{}, errors.Trace(err)\n\t}\n\tresult := results.Results[0]\n\tif result.Error != nil {\... | {
"audio": "",
"image": "",
"text": " unit)\n\t\t\t}\n\t\t\tentities[i].Tag = names.NewUnitTag(unit).String()\n\t\t}\n\t\targs.Tags = params.Entities{Entities: entities}\n\t}\n\n\tresults := new(params.ErrorResults)\n\terr := c.facade.FacadeCall(\"ResolveUnitErrors\", args, results)\n\tif err != nil {\n\t\treturn... |
{
"audio": "",
"image": "",
"text": "func (s *Application) WatchLeadershipSettings() (watcher.NotifyWatcher, error) {\n\treturn",
"video": ""
} | {
"audio": "",
"image": "",
"text": " s.st.LeadershipSettings.WatchLeadershipSettings(s.tag.Id())\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " error {\n\twatcher, err := w.getOrCreateWatcher(req.DeploymentID)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn watcher.PromoteDeployment(req, resp)\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func ParseIngressRules(r io.Reader) ([]network.IngressRule, error) {\n\tvar rules []network.IngressRule\n\tscanner := bufio.NewScanner(r)\n\tfor scanner.Scan() {\n\t\tline := scanner.Text()\n\t\trule, ok, err := parseIngressRule(strings.TrimSpace(line))\n\t\tif err != nil {\n\... | {
"audio": "",
"image": "",
"text": "\t\t}\n\t\trules = append(rules, rule)\n\t}\n\tif err := scanner.Err(); err != nil {\n\t\treturn nil, errors.Annotate(err, \"reading iptables output\")\n\t}\n\treturn rules, nil\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\t\tline = scanner.Text()\n\t\tfmt.Fprintf(&s.stdoutBuf, \"%s\\n\", line)\n\t\tif strings.Contains(line, search) {\n\t\t\treturn nil\n\t\t}\n\t}\n\terr = scanner.Err()\n\tif err == nil {\n\t\terr = io.EOF\n\t}\n\treturn err\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func popField(s string) (field, remainder string, ok bool) {\n\ti := strings.IndexRune(s, ' ')\n\tif i == -1 {\n\t\treturn s, \"\", s != \"\"\n\t}\n",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\tfield, remainder = s[:i], strings.TrimLeft(s[i+1:], \" \")\n\treturn field, remainder, true\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " {\n\t\tgoto STRIP\n\t}\n\tif l = os.Getenv(\"LANG\"); l != \"\" {\n\t\tgoto STRIP\n\t}\n\t//fallback to US English\n\tl = \"en_US\"\nSTRIP:\n\t// Deal with any locale names like en_US.utf8\n\tif i := strings.IndexRune(l, '.'); i != -1 {\n\t\tl = l[0:i]\n\t}\n\treturn\n}",
"... |
{
"audio": "",
"image": "",
"text": "func OAuthConfig(\n\tsdkCtx context.Context,\n\tclient subscriptions.Client,\n\tresourceManagerEndpoint string,\n\tsubscriptionId string,\n) (*adal.OAuthConfig, string, error) {\n\tauthURI, err := DiscoverAuthorizationURI(sdkCtx, client, subscriptionId)\n\tif err != nil {\n\t\... | {
"audio": "",
"image": "",
"text": " nil {\n\t\treturn nil, \"\", errors.Annotate(err, \"getting tenant ID\")\n\t}\n\tauthURI.Path = \"\"\n\tadEndpoint := authURI.String()\n\n\toauthConfig, err := adal.NewOAuthConfig(adEndpoint, tenantId)\n\tif err != nil {\n\t\treturn nil, \"\", errors.Annotate(err, \"getting O... | {
"audio": "",
"image": "",
"text": "\t}\n\t// sign the client for authentication and authorization\n\tif authenticate {\n\t\tclient.OAuthSign()\n\t} else {\n\t\tclient.ApiSign()\n\t}\n\n\tresponse := &PhotosListResponse{}\n\terr := flickr.DoGet(client, response)\n\treturn response, err\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func newEnviron(cloud environs.CloudSpec, cfg *config.Config) (*joyentEnviron, error) {\n\tenv := &joyentEnviron{\n\t\tname: cfg.Name(),\n\t\tcloud: cloud,\n\t}\n\tif err := env.SetConfig(cfg); err != nil {\n\t\treturn",
"video": ""
} | {
"audio": "",
"image": "",
"text": " nil, err\n\t}\n\tvar err error\n\tenv.compute, err = newCompute(cloud)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn env, nil\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\t\treturn nil, errors.Trace(err)\n\t}\n\tenv := &environ{\n\t\tname: args.Config.Name(),\n\t\tcloud: args.Cloud,\n\t\tclient: client,\n\t}\n\tif err := env.SetConfig(args.Config); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn env, nil\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (c LastSentClient) GetLastSent(ids []LastSentID) ([]LastSentResult, error) {\n\tvar args params.LogForwardingGetLastSentParams\n\targs.IDs = make([]params.LogForwardingID, len(ids))\n\tfor i, id := range ids {\n\t\targs.IDs[i] = params.LogForwardingID{\n\t\t\tModelTag: id... | {
"audio": "",
"image": "",
"text": " = LastSentResult{\n\t\t\tLastSentInfo: LastSentInfo{\n\t\t\t\tLastSentID: ids[i],\n\t\t\t\tRecordID: apiRes.RecordID,\n\t\t\t},\n\t\t\tError: common.RestoreError(apiRes.Error),\n\t\t}\n\t\tif apiRes.RecordTimestamp > 0 {\n\t\t\tresults[i].RecordTimestamp = time.Unix(0, apiR... | {
"audio": "",
"image": "",
"text": " storagecommon.BlockDeviceFromState(stateBlockDevice), nil\n\t}\n\tfor i, arg := range args.Ids {\n\t\tvar result params.BlockDeviceResult\n\t\tblockDevice, err := one(arg)\n\t\tif err != nil {\n\t\t\tresult.Error = common.ServerError(err)\n\t\t} else {\n\t\t\tresult.Result = ... |
{
"audio": "",
"image": "",
"text": "func (c LastSentClient) SetLastSent(reqs []LastSentInfo) ([]LastSentResult, error) {\n\tvar args params.LogForwardingSetLastSentParams\n\targs.Params = make([]params.LogForwardingSetLastSentParam, len(reqs))\n\tfor i, req := range reqs {\n\t\targs.Params[i] = params.LogForward... | {
"audio": "",
"image": "",
"text": "\n\n\tvar apiResults params.ErrorResults\n\terr := c.caller.FacadeCall(\"SetLastSent\", args, &apiResults)\n\tif err != nil {\n\t\treturn nil, errors.Trace(err)\n\t}\n\n\tresults := make([]LastSentResult, len(reqs))\n\tfor i, apiRes := range apiResults.Results {\n\t\tresults[i... | {
"audio": "",
"image": "",
"text": " := range in {\n\t\tif req.WantReply {\n\t\t\treq.Reply(false, nil)\n\t\t}\n\t}\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func NewReader(config ReaderConfig) (*Reader, error) {\n\tif err := config.validate();",
"video": ""
} | {
"audio": "",
"image": "",
"text": " err != nil {\n\t\treturn nil, errors.Trace(err)\n\t}\n\tr := &Reader{config: config}\n\treturn r, nil\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\tif err = dec.Decode(&config); err != nil {\n\t\treturn\n\t}\n\n\tconfig.Info.Version = os.ExpandEnv(config.Info.Version)\n\terr = config.Validate()\n\treturn\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (r *Reader) Now() (time.Time, error) {\n\tcoll, closer := r.config.Mongo.GetCollection(r.config.Collection)\n\tdefer closer()\n\n\tt, err := readClock(coll)\n\tif errors.Cause(err) == mgo.ErrNotFound {\n\t\t// No time written yet. When it is written\n\t\t//",
"video": "... | {
"audio": "",
"image": "",
"text": " for the first time, it'll be globalEpoch.\n\t\tt = globalEpoch\n\t} else if err != nil {\n\t\treturn time.Time{}, errors.Trace(err)\n\t}\n\treturn t, nil\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " {\n\t\treturn err\n\t}\n\n\tdate, err := time.Parse(r.layout, str)\n\tif err != nil {\n\t\treturn errors.New(r.message)\n\t}\n\n\tif !r.min.IsZero() && r.min.After(date) || !r.max.IsZero() && date.After(r.max) {\n\t\treturn errors.New(r.rangeMessage)\n\t}\n\n\treturn nil\n}",... |
{
"audio": "",
"image": "",
"text": "func (c *ModelStatusAPI) ModelStatus(tags ...names.ModelTag) ([]base.ModelStatus, error) {\n\tresult := params.ModelStatusResults{}\n\tmodels := make([]params.Entity, len(tags))\n\tfor i, tag := range tags {\n\t\tmodels[i] = params.Entity{Tag: tag.String()}\n\t}\n\treq := para... | {
"audio": "",
"image": "",
"text": "\t\tEntities: models,\n\t}\n\tif err := c.facade.FacadeCall(\"ModelStatus\", req, &result); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn c.processModelStatusResults(result.Results)\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " unit)\n\t\t\t}\n\t\t\tentities[i].Tag = names.NewUnitTag(unit).String()\n\t\t}\n\t\targs.Tags = params.Entities{Entities: entities}\n\t}\n\n\tresults := new(params.ErrorResults)\n\terr := c.facade.FacadeCall(\"ResolveUnitErrors\", args, results)\n\tif err != nil {\n\t\treturn... |
{
"audio": "",
"image": "",
"text": "func OnlyConnect(a agent.Agent, apiOpen api.OpenFunc) (api.Connection, error) {\n\tagentConfig := a.CurrentConfig()\n\tinfo, ok := agentConfig.APIInfo()\n\tif !ok {\n\t\treturn nil, errors.New(\"API info not available\")\n\t}\n\tconn, _, err",
"video": ""
} | {
"audio": "",
"image": "",
"text": " := connectFallback(apiOpen, info, agentConfig.OldPassword())\n\tif err != nil {\n\t\treturn nil, errors.Trace(err)\n\t}\n\treturn conn, nil\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\treturn errors.New(\"Expected value to be a float64 but it was not\")\n\t\t}\n\tcase MetadataValueTypeBool:\n\t\t_, ok := m.Value.(bool)\n\t\tif !ok {\n\t\t\treturn errors.New(\"Expected value to be a bool but it was not\")\n\t\t}\n\tcase MetadataValueTypeObject:\n\t\tval, ok... |
{
"audio": "",
"image": "",
"text": "func NewExternalControllerConnection(apiInfo *api.Info) (api.Connection, error) {\n\treturn api.Open(apiInfo, api.DialOpts{\n\t\tTimeout: ",
"video": ""
} | {
"audio": "",
"image": "",
"text": " 2 * time.Second,\n\t\tRetryDelay: 500 * time.Millisecond,\n\t})\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\t\treturn c.apiOpenFunc(info, opts)\n\t}\n\treturn api.Open(info, opts)\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func StoreCharmArchive(st State, archive CharmArchive) error {\n\tstorage := newStateStorage(st.ModelUUID(), st.MongoSession())\n\tstoragePath, err := charmArchiveStoragePath(archive.ID)\n\tif err != nil {\n\t\treturn errors.Annotate(err, \"cannot generate charm archive name\"... | {
"audio": "",
"image": "",
"text": "\n\t\tVersion: archive.CharmVersion,\n\t}\n\n\t// Now update the charm data in state and mark it as no longer pending.\n\t_, err = st.UpdateUploadedCharm(info)\n\tif err != nil {\n\t\talreadyUploaded := err == state.ErrCharmRevisionAlreadyModified ||\n\t\t\terrors.Cause(er... | {
"audio": "",
"image": "",
"text": " GUI archive\")\n\t}\n\tif _, err = io.Copy(f, r); err != nil {\n\t\treturn nil, errors.Annotate(err, \"cannot retrieve Juju GUI archive\")\n\t}\n\tif _, err = f.Seek(0, 0); err != nil {\n\t\treturn nil, errors.Annotate(err, \"cannot seek temporary archive file\")\n\t}\n\tretu... |
{
"audio": "",
"image": "",
"text": "func charmArchiveStoragePath(curl *charm.URL) (string, error) {\n\tuuid, err := utils.NewUUID()",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\treturn fmt.Sprintf(\"charms/%s-%s\", curl.String(), uuid), nil\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " string, vlanId string) error {\n\treturn hyperv.SetNetworkAdapterVlanId(switchName, vlanId)\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func NewAPI(caller base.APICallCloser) *API {\n\tif caller == nil {\n\t\tpanic(\"caller is nil\")\n\t}\n\tclientFacade, facadeCaller := base.NewClientFacade(caller, subnetsFacade)",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\treturn &API{\n\t\tClientFacade: clientFacade,\n\t\tfacade: facadeCaller,\n\t}\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " non-empty.\n\tif headers[\"X-Uber-Source\"] == \"\" {\n\t\theaders[\"X-Uber-Source\"] = caller\n\t}\n\treturn headers\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (api *API) AddSubnet(subnet names.SubnetTag, providerId network.Id, space names.SpaceTag, zones []string) error {\n\tvar response params.ErrorResults\n\t// Prefer ProviderId when set over CIDR.\n\tsubnetTag := subnet.String()\n\tif providerId != \"\" {\n\t\tsubnetTag = \"... | {
"audio": "",
"image": "",
"text": " space.String(),\n\t\t\tZones: zones,\n\t\t}},\n\t}\n\terr := api.facade.FacadeCall(\"AddSubnets\", params, &response)\n\tif err != nil {\n\t\treturn errors.Trace(err)\n\t}\n\treturn response.OneError()\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " {\n\t\top := addr.st.networkEntityGlobalKeyRemoveOp(\"address\", addr.ProviderID())\n\t\tops = append(ops, op)\n\t}\n\treturn addr.st.db().RunTransaction(ops)\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (api *API) CreateSubnet(subnet names.SubnetTag, space names.SpaceTag, zones []string, isPublic bool) error {\n\tvar response params.ErrorResults\n\tparams := params.CreateSubnetsParams{\n\t\tSubnets: []params.CreateSubnetParams{{\n\t\t\tSubnetTag: subnet.String(),\n\t\t\t... | {
"audio": "",
"image": "",
"text": " zones,\n\t\t\tIsPublic: isPublic,\n\t\t}},\n\t}\n\terr := api.facade.FacadeCall(\"CreateSubnets\", params, &response)\n\tif err != nil {\n\t\treturn errors.Trace(err)\n\t}\n\treturn response.OneError()\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " and adding %s\",\n\t\t\t\tname, string(val.ProviderId))\n\t\t\texchanges[name] = network.SpaceInfo{\n\t\t\t\tName: name,\n\t\t\t\tProviderId: val.SpaceProviderId,\n\t\t\t\tSubnets: []network.SubnetInfo{\n\t\t\t\t\tval,\n\t\t\t\t},\n\t\t\t}\n\t\t} else {\n\t\t\tlogger.In... |
{
"audio": "",
"image": "",
"text": "func (api *API) ListSubnets(spaceTag *names.SpaceTag, zone string) ([]params.Subnet, error) {\n\tvar response params.ListSubnetsResults\n\tvar space string\n\tif spaceTag != nil {\n\t\tspace = spaceTag.String()\n\t}\n\targs := params.SubnetsFilters{\n\t\tSpaceTag: space,\n\t",... | {
"audio": "",
"image": "",
"text": "\tZone: zone,\n\t}\n\terr := api.facade.FacadeCall(\"ListSubnets\", args, &response)\n\tif err != nil {\n\t\treturn nil, errors.Trace(err)\n\t}\n\treturn response.Results, nil\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " and adding %s\",\n\t\t\t\tname, string(val.ProviderId))\n\t\t\texchanges[name] = network.SpaceInfo{\n\t\t\t\tName: name,\n\t\t\t\tProviderId: val.SpaceProviderId,\n\t\t\t\tSubnets: []network.SubnetInfo{\n\t\t\t\t\tval,\n\t\t\t\t},\n\t\t\t}\n\t\t} else {\n\t\t\tlogger.In... |
{
"audio": "",
"image": "",
"text": "func MongoIndexes() []mgo.Index {\n\treturn []mgo.Index{{\n\t\tKey: []string{\"expire-at\"},",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\t\tExpireAfter: expiryTime,\n\t\tSparse: true,\n\t}}\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " idTokenValidFor,\n\t\tkey: func() (*rsa.PrivateKey, error) {\n\t\t\treturn rsa.GenerateKey(rand.Reader, 2048)\n\t\t},\n\t}\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (s *storage) SaveMetadataNoExpiry(metadata []Metadata) error {\n",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\treturn s.saveMetadata(metadata, false)\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " *Storage {\n\treturn &Storage{\n\t\tobjC: objC,\n\t\tprefix: prefix,\n\t}\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (s *storage) SaveMetadata(metadata []Metadata) error {\n\treturn",
"video": ""
} | {
"audio": "",
"image": "",
"text": " s.saveMetadata(metadata, true)\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " *Storage {\n\treturn &Storage{\n\t\tobjC: objC,\n\t\tprefix: prefix,\n\t}\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (s *storage) DeleteMetadata(imageId string) error {\n\tdeleteOperation := func(docId string) txn.Op {\n\t\tlogger.Debugf(\"deleting metadata (ID=%v) for image (ID=%v)\", docId, imageId)\n\t\treturn txn.Op{\n\t\t\tC: s.collection,\n\t\t\tId: docId,\n\t\t\tAssert: ... | {
"audio": "",
"image": "",
"text": " noOp()\n\t\t}\n\n\t\tallTxn := make([]txn.Op, len(imageMetadata))\n\t\tfor i, doc := range imageMetadata {\n\t\t\tallTxn[i] = deleteOperation(doc.Id)\n\t\t}\n\t\treturn allTxn, nil\n\t}\n\n\terr := s.store.RunTransaction(buildTxn)\n\tif err != nil {\n\t\treturn errors.Annotat... | {
"audio": "",
"image": "",
"text": "\n\t\t}\n\t\tif attachment.existing {\n\t\t\tops = append(ops, txn.Op{\n\t\t\t\tC: volumesC,\n\t\t\t\tId: attachment.tag.Id(),\n\t\t\t\tAssert: txn.DocExists,\n\t\t\t\tUpdate: bson.D{{\"$inc\", bson.D{{\"attachmentcount\", 1}}}},\n\t\t\t})\n\t\t}\n\t}\n\treturn ops\n}... |
{
"audio": "",
"image": "",
"text": "func (s *storage) AllCloudImageMetadata() ([]Metadata, error) {\n\tcoll, closer := s.store.GetCollection(s.collection)\n\tdefer closer()\n\n\tresults := []Metadata{}\n\tdocs := []imagesMetadataDoc{}\n\terr := coll.Find(nil).All(&docs)\n\tif err != nil {\n\t\treturn nil, errors... | {
"audio": "",
"image": "",
"text": " get all image metadata\")\n\t}\n\tfor _, doc := range docs {\n\t\tresults = append(results, doc.metadata())\n\t}\n\treturn results, nil\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\tif err := coll.Find(nil).All(&docs); err != nil {\n\t\treturn nil, errors.Trace(err)\n\t}\n\treturn nsPayloads.asPayloads(docs), nil\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (s *storage) FindMetadata(criteria MetadataFilter) (map[string][]Metadata, error) {\n\tcoll, closer := s.store.GetCollection(s.collection)\n\tdefer closer()\n\n\tlogger.Debugf(\"searching for image metadata %#v\", criteria)\n\tsearchCriteria := buildSearchClauses(criteria... | {
"audio": "",
"image": "",
"text": "\tif len(docs) == 0 {\n\t\treturn nil, errors.NotFoundf(\"matching cloud image metadata\")\n\t}\n\n\tmetadata := make(map[string][]Metadata)\n\tfor _, doc := range docs {\n\t\tone := doc.metadata()\n\t\tmetadata[one.Source] = append(metadata[one.Source], one)\n\t}\n\treturn me... | {
"audio": "",
"image": "",
"text": "\n\ts.Criteria = v\n\treturn s\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (s *storage) SupportedArchitectures(criteria MetadataFilter) ([]string, error) {\n\tcoll, closer := s.store.GetCollection(s.collection)\n\tdefer closer()\n\n\tvar arches []string\n",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\tif err := coll.Find(buildSearchClauses(criteria)).Distinct(\"arch\", &arches); err != nil {\n\t\treturn nil, errors.Trace(err)\n\t}\n\treturn arches, nil\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " != nil {\n\t\treturn bi.closer.Close()\n\t}\n\treturn nil\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func putState(stor storage.StorageWriter, data []byte) error {\n\tlogger.Debugf(\"putting %q to bootstrap storage %T\", StateFile, stor)\n\treturn",
"video": ""
} | {
"audio": "",
"image": "",
"text": " stor.Put(StateFile, bytes.NewBuffer(data), int64(len(data)))\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\terr := stor.shutdown()\n\tstor.lock.Unlock()\n\treturn err\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func CreateStateFile(stor storage.Storage) (string, error) {\n\terr := putState(stor, []byte{})\n\tif err != nil {\n\t\treturn",
"video": ""
} | {
"audio": "",
"image": "",
"text": " \"\", fmt.Errorf(\"cannot create initial state file: %v\", err)\n\t}\n\treturn stor.URL(StateFile)\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\tif err := storage.DeleteGatewayProfile(storage.DB(), gpID); err != nil {\n\t\treturn nil, errToRPCError(err)\n\t}\n\n\treturn &empty.Empty{}, nil\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func SaveState(storage storage.StorageWriter, state *BootstrapState) error {\n\tdata, err := goyaml.Marshal(state)\n\tif err",
"video": ""
} | {
"audio": "",
"image": "",
"text": " != nil {\n\t\treturn err\n\t}\n\treturn putState(storage, data)\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\t\t\tif err := updateGatewayState(storage.DB(), storage.RedisPool(), stats); err != nil {\n\t\t\t\t\tlog.WithError(err).Error(\"update gateway state error\")\n\t\t\t\t}\n\n\t\t\t\tif err := handleGatewayStats(storage.RedisPool(), stats); err != nil {\n\t\t\t\t\tlog.WithError(... |
{
"audio": "",
"image": "",
"text": "func LoadState(stor storage.StorageReader) (*BootstrapState, error) {\n\tr, err := storage.Get(stor, StateFile)",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\tif err != nil {\n\t\tif errors.IsNotFound(err) {\n\t\t\treturn nil, environs.ErrNotBootstrapped\n\t\t}\n\t\treturn nil, err\n\t}\n\treturn loadState(r)\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " GetWithRetry(stor, name, stor.DefaultConsistencyStrategy())\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func AddStateInstance(stor storage.Storage, id instance.Id) error {\n\tstate, err := LoadState(stor)\n\tif err == environs.ErrNotBootstrapped {\n\t\tstate = &BootstrapState{}\n\t} else if err != nil {\n\t\treturn errors.Annotate(err, \"cannot",
"video": ""
} | {
"audio": "",
"image": "",
"text": " record state instance-id\")\n\t}\n\tstate.StateInstances = append(state.StateInstances, id)\n\treturn SaveState(stor, state)\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " GUI archive\")\n\t}\n\tif _, err = io.Copy(f, r); err != nil {\n\t\treturn nil, errors.Annotate(err, \"cannot retrieve Juju GUI archive\")\n\t}\n\tif _, err = f.Seek(0, 0); err != nil {\n\t\treturn nil, errors.Annotate(err, \"cannot seek temporary archive file\")\n\t}\n\tretu... |
{
"audio": "",
"image": "",
"text": "func RemoveStateInstances(stor storage.Storage, ids ...instance.Id) error {\n\tstate, err := LoadState(stor)\n\tif err == environs.ErrNotBootstrapped {\n\t\treturn nil\n\t} else if err != nil {\n\t\treturn errors.Annotate(err, \"cannot remove recorded state instance-id\")\n\t}... | {
"audio": "",
"image": "",
"text": "\t\thead := state.StateInstances[:i]\n\t\t\t\ttail := state.StateInstances[i+1:]\n\t\t\t\tstate.StateInstances = append(head, tail...)\n\t\t\t\tanyFound = true\n\t\t\t\ti--\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\tif !anyFound {\n\t\treturn nil\n\t}\n\treturn SaveState(stor, sta... | {
"audio": "",
"image": "",
"text": " := func() error {\n\t\t\tfor i := range indices {\n\t\t\t\terr := bt.readyWorker(\n\t\t\t\t\tgroupCtx, id, bcache, rp, bps, pathsFromRoot, makeSync,\n\t\t\t\t\ti, level, &lock, oldPtrs, donePtrs)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn... |
{
"audio": "",
"image": "",
"text": "func ProviderStateInstances(stor storage.StorageReader) ([]instance.Id, error) {\n\tst, err := LoadState(stor)\n\tif",
"video": ""
} | {
"audio": "",
"image": "",
"text": " err != nil {\n\t\treturn nil, err\n\t}\n\treturn st.StateInstances, nil\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\terr := stor.shutdown()\n\tstor.lock.Unlock()\n\treturn err\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func NewFacade(\n\tresources facade.Resources,\n\tauthorizer facade.Authorizer,\n\tst CAASFirewallerState,\n) (*Facade, error) {\n\tif !authorizer.AuthController() {\n\t\treturn nil, common.ErrPerm\n\t}\n\taccessApplication := common.AuthFuncForTagKind(names.ApplicationTagKind... | {
"audio": "",
"image": "",
"text": "\t\t\t\tcommon.AuthFuncForTagKind(names.UnitTagKind),\n\t\t\t),\n\t\t),\n\t\tAgentEntityWatcher: common.NewAgentEntityWatcher(\n\t\t\tst,\n\t\t\tresources,\n\t\t\taccessApplication,\n\t\t),\n\t\tresources: resources,\n\t\tstate: st,\n\t}, nil\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\t\t\treturn authorizer.AuthOwner(tag)\n\t\t}, nil\n\t}\n\taccessUnit := func() (common.AuthFunc, error) {\n\t\treturn func(tag names.Tag) bool {\n\t\t\treturn false\n\t\t}, nil\n\t}\n\n\treturn &API{\n\t\tst: st,\n\t\tresources: resources,\n\t\t... |
{
"audio": "",
"image": "",
"text": "func (f *Facade) IsExposed(args params.Entities) (params.BoolResults, error) {\n\tresults := params.BoolResults{\n\t\tResults: make([]params.BoolResult, len(args.Entities)),\n\t}\n\tfor i, arg := range args.Entities {\n\t\texposed, err := f.isExposed(f.state, arg.Tag)\n",
"v... | {
"audio": "",
"image": "",
"text": "\t\tif err != nil {\n\t\t\tresults.Results[i].Error = common.ServerError(err)\n\t\t\tcontinue\n\t\t}\n\t\tresults.Results[i].Result = exposed\n\t}\n\treturn results, nil\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " len(args.Models)),\n\t}\n\tfor i, arg := range args.Models {\n\t\terr := f.setModelEnvironVersion(arg)\n\t\tif err != nil {\n\t\t\tresult.Results[i].Error = common.ServerError(err)\n\t\t}\n\t}\n\treturn result, nil\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (c *importKeysCommand) Run(context *cmd.Context) error {\n\tclient, err := c.NewKeyManagerClient()\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer client.Close()\n\n\t// TODO(alexisb) - currently keys are global which is not ideal.\n\t// keymanager needs to be updated to... | {
"audio": "",
"image": "",
"text": "\tif err != nil {\n\t\treturn block.ProcessBlockedError(err, block.BlockChange)\n\t}\n\tfor i, result := range results {\n\t\tif result.Error != nil {\n\t\t\tfmt.Fprintf(context.Stderr, \"cannot import key id %q: %v\\n\", c.sshKeyIds[i], result.Error)\n\t\t}\n\t}\n\treturn nil... | {
"audio": "",
"image": "",
"text": " errors.Annotate(err, \"failed to unmarshal JobConfig\").Err()\n\t}\n\treturn func(c context.Context, keys []*datastore.Key) error {\n\t\treturn m.Func(c, j.ID, cfg, keys)\n\t}, nil\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func ValidateToolsMetadata(params *ToolsMetadataLookupParams) ([]string, *simplestreams.ResolveInfo, error) {\n\tif len(params.Sources) == 0 {\n\t\treturn nil, nil, fmt.Errorf(\"required parameter sources not specified\")\n\t}\n\tif params.Version == \"\" && params.Major == 0 ... | {
"audio": "",
"image": "",
"text": " []string{params.Series},\n\t\t\tArches: params.Architectures,\n\t\t})\n\t}\n\tmatchingTools, resolveInfo, err := Fetch(params.Sources, toolsConstraint)\n\tif err != nil {\n\t\treturn nil, resolveInfo, err\n\t}\n\tif len(matchingTools) == 0 {\n\t\treturn nil, resolveInfo, fmt.... | {
"audio": "",
"image": "",
"text": " bridge,\n\t\tMemory: params.Memory,\n\t\tCpuCores: params.CpuCores,\n\t\tRootDisk: params.RootDisk,\n\t\tInterfaces: interfaces,\n\t}); err != nil {\n\t\treturn err\n\t}\n\n\tlogger.Debugf(\"Set machine %s to autostart\", c.name)\n\tif para... |
{
"audio": "",
"image": "",
"text": "func (fw *firewallRulesState) Save(rule FirewallRule) error {\n\tif err := rule.WellKnownService.validate(); err != nil {\n\t\treturn errors.Trace(err)\n\t}\n\tfor _, cidr := range rule.WhitelistCIDRs {\n\t\tif _, _, err := net.ParseCIDR(cidr); err != nil {\n\t\t\treturn error... | {
"audio": "",
"image": "",
"text": "\tC: firewallRulesC,\n\t\t\t\tId: serviceStr,\n\t\t\t\tAssert: txn.DocExists,\n\t\t\t\tUpdate: bson.D{\n\t\t\t\t\t{\"$set\", bson.D{{\"whitelist-cidrs\", rule.WhitelistCIDRs}}},\n\t\t\t\t},\n\t\t\t}, model.assertActiveOp()}\n\t\t} else {\n\t\t\tdoc.WhitelistCIDRS = ru... | {
"audio": "",
"image": "",
"text": " secrules {\n\t\terr := f.client.DeleteSecRule(rule.Name)\n\t\tif err != nil {\n\t\t\tif api.IsNotFound(err) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\treturn errors.Trace(err)\n\t\t}\n\t}\n\treturn nil\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (fw *firewallRulesState) Rule(service WellKnownServiceType) (*FirewallRule, error) {\n\tcoll, closer := fw.st.db().GetCollection(firewallRulesC)\n\tdefer closer()\n\n\tvar doc",
"video": ""
} | {
"audio": "",
"image": "",
"text": " firewallRulesDoc\n\terr := coll.FindId(string(service)).One(&doc)\n\tif err == mgo.ErrNotFound {\n\t\treturn nil, errors.NotFoundf(\"firewall rules for service %v\", service)\n\t}\n\tif err != nil {\n\t\treturn nil, errors.Trace(err)\n\t}\n\treturn doc.toRule(), nil\n}",
"v... | {
"audio": "",
"image": "",
"text": "\tmachined.ingressRules = want\n\tif fw.globalMode {\n\t\treturn fw.flushGlobalPorts(toOpen, toClose)\n\t}\n\treturn fw.flushInstancePorts(machined, toOpen, toClose)\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (fw *firewallRulesState) AllRules() ([]*FirewallRule, error) {\n\tcoll, closer := fw.st.db().GetCollection(firewallRulesC)\n\tdefer closer()\n\n\tvar docs []firewallRulesDoc\n\terr := coll.Find(nil).All(&docs)\n\tif err != nil {\n\t\treturn nil, errors.Trace(err)\n\t}",
... | {
"audio": "",
"image": "",
"text": "\n\tresult := make([]*FirewallRule, len(docs))\n\tfor i, doc := range docs {\n\t\tresult[i] = doc.toRule()\n\t}\n\treturn result, nil\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " coll.Find(query).All(docs); err != nil {\n\t\treturn errors.Trace(err)\n\t}\n\treturn nil\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (w *hookRunner) acquireExecutionLock(action string, interrupt <-chan struct{}) (func(), error) {\n\tspec := machinelock.Spec{\n\t\tCancel: interrupt,\n\t\tWorker: \"meterstatus\",\n\t\tComment: action,\n\t}\n\treleaser,",
"video": ""
} | {
"audio": "",
"image": "",
"text": " err := w.machineLock.Acquire(spec)\n\tif err != nil {\n\t\treturn nil, errors.Trace(err)\n\t}\n\treturn releaser, nil\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " data.BlockCacheLifetime, action BlockRequestAction) <-chan error {\n\tif brq.config.IsSyncedTlf(kmd.TlfID()) {\n\t\taction = action.AddSync()\n\t}\n\treturn brq.request(ctx, priority, kmd, ptr, block, lifetime, action)\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (st *State) CreateCloudAccess(cloud string, user names.UserTag, access permission.Access) error {\n\tif err := permission.ValidateCloudAccess(access); err != nil {\n\t\treturn errors.Trace(err)\n\t}\n\n\t// Local users must exist.\n\tif user.IsLocal() {\n\t\t_, err := st.... | {
"audio": "",
"image": "",
"text": " := createPermissionOp(cloudGlobalKey(cloud), userGlobalKey(userAccessID(user)), access)\n\n\terr := st.db().RunTransaction([]txn.Op{op})\n\tif err == txn.ErrAborted {\n\t\terr = errors.AlreadyExistsf(\"permission for user %q for cloud %q\", user.Id(), cloud)\n\t}\n\treturn er... | {
"audio": "",
"image": "",
"text": " = errors.AlreadyExistsf(\"cloud %q\", c.Name)\n\t\t}\n\t\treturn err\n\t}\n\t// Ensure the owner has access to the cloud.\n\townerTag := names.NewUserTag(owner)\n\terr := st.CreateCloudAccess(c.Name, ownerTag, permission.AdminAccess)\n\tif err != nil {\n\t\treturn errors.Anno... |
{
"audio": "",
"image": "",
"text": "func (st *State) GetCloudAccess(cloud string, user names.UserTag) (permission.Access, error) {\n\tperm, err",
"video": ""
} | {
"audio": "",
"image": "",
"text": " := st.userPermission(cloudGlobalKey(cloud), userGlobalKey(userAccessID(user)))\n\tif err != nil {\n\t\treturn \"\", errors.Trace(err)\n\t}\n\treturn perm.access(), nil\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " = errors.AlreadyExistsf(\"cloud %q\", c.Name)\n\t\t}\n\t\treturn err\n\t}\n\t// Ensure the owner has access to the cloud.\n\townerTag := names.NewUserTag(owner)\n\terr := st.CreateCloudAccess(c.Name, ownerTag, permission.AdminAccess)\n\tif err != nil {\n\t\treturn errors.Anno... |
{
"audio": "",
"image": "",
"text": "func (st *State) GetCloudUsers(cloud string) (map[string]permission.Access, error) {\n\tperms, err := st.usersPermissions(cloudGlobalKey(cloud))\n\tif err != nil {\n\t\treturn nil, errors.Trace(err)\n\t}\n\tresult := make(map[string]permission.Access)\n\tfor",
"video": ""
} | {
"audio": "",
"image": "",
"text": " _, p := range perms {\n\t\tresult[userIDFromGlobalKey(p.doc.SubjectGlobalKey)] = p.access()\n\t}\n\treturn result, nil\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " = errors.AlreadyExistsf(\"cloud %q\", c.Name)\n\t\t}\n\t\treturn err\n\t}\n\t// Ensure the owner has access to the cloud.\n\townerTag := names.NewUserTag(owner)\n\terr := st.CreateCloudAccess(c.Name, ownerTag, permission.AdminAccess)\n\tif err != nil {\n\t\treturn errors.Anno... |
{
"audio": "",
"image": "",
"text": "func (st *State) UpdateCloudAccess(cloud string, user names.UserTag, access permission.Access) error {\n\tif err := permission.ValidateCloudAccess(access); err != nil {\n\t\treturn errors.Trace(err)\n\t}\n\n\tbuildTxn := func(int) ([]txn.Op,",
"video": ""
} | {
"audio": "",
"image": "",
"text": " error) {\n\t\t_, err := st.GetCloudAccess(cloud, user)\n\t\tif err != nil {\n\t\t\treturn nil, errors.Trace(err)\n\t\t}\n\t\tops := []txn.Op{updatePermissionOp(cloudGlobalKey(cloud), userGlobalKey(userAccessID(user)), access)}\n\t\treturn ops, nil\n\t}\n\n\terr := st.db().Run... | {
"audio": "",
"image": "",
"text": " = errors.AlreadyExistsf(\"cloud %q\", c.Name)\n\t\t}\n\t\treturn err\n\t}\n\t// Ensure the owner has access to the cloud.\n\townerTag := names.NewUserTag(owner)\n\terr := st.CreateCloudAccess(c.Name, ownerTag, permission.AdminAccess)\n\tif err != nil {\n\t\treturn errors.Anno... |
{
"audio": "",
"image": "",
"text": "func (st *State) RemoveCloudAccess(cloud string, user names.UserTag) error {\n\tbuildTxn := func(int) ([]txn.Op, error) {\n\t\t_, err := st.GetCloudAccess(cloud, user)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\t\tops := []txn.Op{removePermissionOp(cloudGlobalKey(cloud), userGlobalKey(userAccessID(user)))}\n\t\treturn ops, nil\n\t}\n\n\terr := st.db().Run(buildTxn)\n\treturn errors.Trace(err)\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\t\t\tsuspendOps, err := st.suspendRevokedRelationsOps(offerUUID, user.Id())\n\t\t\tif err != nil {\n\t\t\t\treturn nil, errors.Trace(err)\n\t\t\t}\n\t\t\tops = append(ops, suspendOps...)\n\t\t}\n\t\treturn ops, nil\n\t}\n\n\terr = st.db().Run(buildTxn)\n\treturn errors.Trac... |
{
"audio": "",
"image": "",
"text": "func (st *State) CloudsForUser(user names.UserTag, all bool) ([]CloudInfo, error) {\n\t// We only treat the user as a superuser if they pass --all\n\tisControllerSuperuser := false\n\tif all {\n\t\tvar err error\n\t\tisControllerSuperuser, err = st.isUserSuperuser(user)\n\t\ti... | {
"audio": "",
"image": "",
"text": " get all the clouds.\n\t\tcloudQuery = clouds.Find(nil)\n\t} else {\n\t\tcloudNames, err := st.cloudNamesForUser(user)\n\t\tif err != nil {\n\t\t\treturn nil, errors.Trace(err)\n\t\t}\n\t\tcloudQuery = clouds.Find(bson.M{\n\t\t\t\"_id\": bson.M{\"$in\": cloudNames},\n\t\t})\n\... | {
"audio": "",
"image": "",
"text": "\n\t\t\tsuspendOps, err := st.suspendRevokedRelationsOps(offerUUID, user.Id())\n\t\t\tif err != nil {\n\t\t\t\treturn nil, errors.Trace(err)\n\t\t\t}\n\t\t\tops = append(ops, suspendOps...)\n\t\t}\n\t\treturn ops, nil\n\t}\n\n\terr = st.db().Run(buildTxn)\n\treturn errors.Trac... |
{
"audio": "",
"image": "",
"text": "func (st *State) cloudNamesForUser(user names.UserTag) ([]string, error) {\n\t// Start by looking up cloud names that the user has access to, and then load only the records that are\n\t// included in that set\n\tpermissions, permCloser := st.db().GetRawCollection(permissionsC)... | {
"audio": "",
"image": "",
"text": " permissionDoc\n\titer := query.Iter()\n\tvar cloudNames []string\n\tfor iter.Next(&doc) {\n\t\tcloudName := strings.TrimPrefix(doc.ObjectGlobalKey, \"cloud#\")\n\t\tcloudNames = append(cloudNames, cloudName)\n\t}\n\tif err := iter.Close(); err != nil {\n\t\treturn nil, errors... | {
"audio": "",
"image": "",
"text": " s.VoiceConnections[st.GuildID]\n\ts.RUnlock()\n\tif !exists {\n\t\treturn\n\t}\n\n\t// We only care about events that are about us.\n\tif s.State.User.ID != st.UserID {\n\t\treturn\n\t}\n\n\t// Store the SessionID for later use.\n\tvoice.Lock()\n\tvoice.UserID = st.UserID\n\t... |
{
"audio": "",
"image": "",
"text": "func NewMachineInitReader(series string) (InitReader, error) {\n\tcloudInitConfigDir, err := paths.CloudInitCfgDir(series)\n\tif err != nil {\n\t\treturn nil, errors.Annotate(err, \"determining CloudInitCfgDir for the machine\")\n\t}\n\tcloudInitInstanceConfigDir, err := paths... | {
"audio": "",
"image": "",
"text": " series,\n\t\tCloudInitConfigDir: cloudInitConfigDir,\n\t\tCloudInitInstanceConfigDir: cloudInitInstanceConfigDir,\n\t\tCurtinInstallConfigFile: curtinInstallConfigFile,\n\t}\n\treturn NewMachineInitReaderFromConfig(cfg), nil\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " != nil {\n\t\treturn nil, errors.Annotate(err, ErrIllegalSourceFormat, errorMessages)\n\t}\n\tcfg := &etc{\n\t\tvalues: values,\n\t}\n\tif err = cfg.postProcess(); err != nil {\n\t\treturn nil, errors.Annotate(err, ErrCannotPostProcess, errorMessages)\n\t}\n\treturn cfg, nil\... |
{
"audio": "",
"image": "",
"text": "func (r *MachineInitReader) GetInitConfig() (map[string]interface{}, error) {\n\tseries := r.config.Series\n\n\tcontainerOS, err := utilsseries.GetOSFromSeries(series)\n\tif err != nil {\n\t\treturn nil, errors.Trace(err)\n\t}\n\tswitch containerOS {\n\tcase utilsos.Ubuntu, ut... | {
"audio": "",
"image": "",
"text": "\n\t\treturn nil, errors.Trace(err)\n\t}\n\n\tfile := filepath.Join(r.config.CloudInitInstanceConfigDir, \"vendor-data.txt\")\n\tvendorData, err := r.unmarshallConfigFile(file)\n\tif err != nil {\n\t\treturn nil, errors.Trace(err)\n\t}\n\tfor k, v := range vendorData {\n\t\tma... | {
"audio": "",
"image": "",
"text": "\n\n\tunitServices, allConfirmed, err := w.compareUnitAgentServices(w.preparedUnits)\n\tif err != nil {\n\t\treturn errors.Trace(err)\n\t}\n\tif !allConfirmed {\n\t\tw.logger.Debugf(\n\t\t\t\"waiting for units to complete series upgrade preparation; known unit agent services: ... |
{
"audio": "",
"image": "",
"text": "func (r *MachineInitReader) getMachineCloudCfgDirData() (map[string]interface{}, error) {\n\tdir := r.config.CloudInitConfigDir\n\n\tfiles, err := ioutil.ReadDir(dir)\n\tif err != nil {\n\t\treturn nil, errors.Annotate(err, \"determining files in CloudInitCfgDir for the machin... | {
"audio": "",
"image": "",
"text": "\n\tsort.Sort(sortedFiles)\n\n\tcloudInit := make(map[string]interface{})\n\tfor _, file := range files {\n\t\tname := file.Name()\n\t\tif !strings.HasSuffix(name, \".cfg\") {\n\t\t\tcontinue\n\t\t}\n\t\t_, cloudCfgData, err := fileAsConfigMap(filepath.Join(dir, name))\n\t\tif... | {
"audio": "",
"image": "",
"text": "\t\t\treturn errors.Reason(\"failed to fetch quota\").Err()\n\t\t}\n\t\treturn errors.Annotate(err, \"failed to fetch quota\").Err()\n\t}\n\tfor _, r := range rsp.Items {\n\t\tif regs.Has(r.Name) {\n\t\t\tfor _, q := range r.Quotas {\n\t\t\t\tif mets.Has(q.Metric) {\n\t\t\t\t\... |
{
"audio": "",
"image": "",
"text": "func (r *MachineInitReader) unmarshallConfigFile(file string) (map[string]interface{}, error) {\n\traw, config, err := fileAsConfigMap(file)\n\tif err == nil {\n\t\treturn config, nil\n\t}\n\tif !errors.IsNotValid(err) {\n\t\treturn nil, errors.Trace(err)\n\t}\n\n\t// The data... | {
"audio": "",
"image": "",
"text": " During testing, it was found that the trusty vendor-data.txt.i file\n\t\t// can contain only the text \"NONE\", which doesn't unmarshall or decompress\n\t\t// we don't want to fail in that case.\n\t\tif r.config.Series == \"trusty\" {\n\t\t\tlogger.Debugf(\"failed to unmarsha... | {
"audio": "",
"image": "",
"text": " err := c.facade.RawAPICaller().BakeryClient().DischargeAll(info.Macaroon)\n\tif err == nil && logger.IsTraceEnabled() {\n\t\tlogger.Tracef(\"discharge macaroon ids:\")\n\t\tfor _, m := range ms {\n\t\t\tlogger.Tracef(\" - %v\", m.Id())\n\t\t}\n\t}\n\tif err != nil {\n\t\tret... |
{
"audio": "",
"image": "",
"text": "func fileAsConfigMap(file string) ([]byte, map[string]interface{}, error) {\n\traw, err := ioutil.ReadFile(file)\n\tif err != nil {\n\t\treturn nil, nil, errors.Annotatef(err, \"reading config from %q\", file)\n\t}\n\tif len(raw) == 0 {\n\t\treturn nil, nil,",
"video": ""
} | {
"audio": "",
"image": "",
"text": " nil\n\t}\n\n\tcfg, err := bytesAsConfigMap(raw)\n\tif err != nil {\n\t\treturn raw, cfg, errors.NotValidf(\"converting %q contents to map: %s\", file, err.Error())\n\t}\n\treturn raw, cfg, nil\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " ioutil.ReadFile(filePath)\n\tif err != nil {\n\t\treturn nil,\n\t\t\tfmt.Errorf(\"Could not read file %s (Error: %s)\",\n\t\t\t\tfilePath, err.Error())\n\t}\n\n\treturn fileContentsArray, nil\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func extractPropertiesFromConfig(props []string, cfg map[string]interface{}, log loggo.Logger) map[string]interface{} {\n\tfoundDataMap := make(map[string]interface{})\n\tfor _, k := range props {\n\t\tkey := strings.TrimSpace(k)\n\t\tswitch key {\n\t\tcase \"apt-security\", \... | {
"audio": "",
"image": "",
"text": "\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tlog.Debugf(\"%s not found in machine init data\", key)\n\t\t\t}\n\t\tcase \"ca-certs\":\n\t\t\t// No translation needed, ca-certs the same in both versions of Cloud-Init.\n\t\t\tif val, ok := cfg[key]; ok {\n\t\t\t\tfoundDat... | {
"audio": "",
"image": "",
"text": "\n\tfor _, o := range opts {\n\t\tif v, ok := o.(*opt.ReplaceExistingSynonymsOption); ok {\n\t\t\treturn v\n\t\t}\n\t}\n\treturn nil\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func extractPropertiesFromConfigLegacy(\n\tprops []string, cfg map[string]interface{}, log loggo.Logger,\n) map[string]interface{} {\n\tfoundDataMap := make(map[string]interface{})\n\taptProcessed := false\n\n\tfor _, k := range props {\n\t\tkey := strings.TrimSpace(k)\n\t\tsw... | {
"audio": "",
"image": "",
"text": " assumption\n\t\t\t// that provisioning trusty machines on much newer MAAS\n\t\t\t// versions is highly unlikely.\n\t\t\tlog.Debugf(\"%q ignored for this machine series\", key)\n\t\tcase \"apt-security\":\n\t\t\t// Translation for apt-security unknown at this time.\n\t\t\tlog.... | {
"audio": "",
"image": "",
"text": "\t}\n\n\t// Operating systems remaining in the map are present in the config but not the database.\n\t// Iterate deterministically over the slice to determine which operating systems need to be added.\n\tfor _, cfg := range oses {\n\t\tif os, ok := cfgs[cfg.Name]; ok {\n\t\t\t... |
{
"audio": "",
"image": "",
"text": "func authorizeCharmStoreEntity(csClient charmstoreForDeploy, curl *charm.URL) (*macaroon.Macaroon, error) {\n\tendpoint := \"/delegatable-macaroon?id=\" + url.QueryEscape(curl.String())\n\tvar m *macaroon.Macaroon\n\tif err",
"video": ""
} | {
"audio": "",
"image": "",
"text": " := csClient.Get(endpoint, &m); err != nil {\n\t\treturn nil, errors.Trace(err)\n\t}\n\treturn m, nil\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " \\\"storage\\\" API extension\")\n\t}\n\n\t// Send the request\n\tpath := fmt.Sprintf(\"/storage-pools/%s/volumes/%s\", url.QueryEscape(pool), url.QueryEscape(volume.Type))\n\t_, _, err := r.query(\"POST\", path, volume, \"\")\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tretu... |
{
"audio": "",
"image": "",
"text": "func (c *Client) WatchApplication(appName string) (watcher.NotifyWatcher, error) {\n\tappTag, err := applicationTag(appName)\n\tif err != nil {",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\t\treturn nil, errors.Trace(err)\n\t}\n\treturn common.Watch(c.facade, \"Watch\", appTag)\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " common.ServerError(err)\n\t\t\tcontinue\n\t\t}\n\n\t\tappName := applicationTag.Id()\n\t\tif appName != requireAppName {\n\t\t\tresult.Error = common.ServerError(common.ErrPerm)\n\t\t\tcontinue\n\t\t}\n\n\t\tsettings, err := lsa.getSettingsFn(appName)\n\t\tif err != nil {\n\t... |
{
"audio": "",
"image": "",
"text": "func (c *Client) Life(appName string) (life.Value, error) {\n\tappTag, err := applicationTag(appName)\n\tif err != nil {\n\t\treturn \"\", errors.Trace(err)\n\t}\n\targs := entities(appTag)\n\n\tvar results params.LifeResults\n\tif err := c.facade.FacadeCall(\"Life\", args, &r... | {
"audio": "",
"image": "",
"text": " := len(results.Results); n != 1 {\n\t\treturn \"\", errors.Errorf(\"expected 1 result, got %d\", n)\n\t}\n\tif err := results.Results[0].Error; err != nil {\n\t\treturn \"\", maybeNotFound(err)\n\t}\n\treturn life.Value(results.Results[0].Life), nil\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " unit)\n\t\t\t}\n\t\t\tentities[i].Tag = names.NewUnitTag(unit).String()\n\t\t}\n\t\targs.Tags = params.Entities{Entities: entities}\n\t}\n\n\tresults := new(params.ErrorResults)\n\terr := c.facade.FacadeCall(\"ResolveUnitErrors\", args, results)\n\tif err != nil {\n\t\treturn... |
{
"audio": "",
"image": "",
"text": "func (c *Client) IsExposed(appName string) (bool, error) {\n\tappTag, err := applicationTag(appName)\n\tif err != nil {\n\t\treturn false, errors.Trace(err)\n\t}\n\targs := entities(appTag)\n\n\tvar results params.BoolResults\n\tif err := c.facade.FacadeCall(\"IsExposed\", arg... | {
"audio": "",
"image": "",
"text": " := len(results.Results); n != 1 {\n\t\treturn false, errors.Errorf(\"expected 1 result, got %d\", n)\n\t}\n\tif err := results.Results[0].Error; err != nil {\n\t\treturn false, maybeNotFound(err)\n\t}\n\treturn results.Results[0].Result, nil\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " unit)\n\t\t\t}\n\t\t\tentities[i].Tag = names.NewUnitTag(unit).String()\n\t\t}\n\t\targs.Tags = params.Entities{Entities: entities}\n\t}\n\n\tresults := new(params.ErrorResults)\n\terr := c.facade.FacadeCall(\"ResolveUnitErrors\", args, results)\n\tif err != nil {\n\t\treturn... |
{
"audio": "",
"image": "",
"text": "func (p CreateMachineParams) Arch() string {\n\tif p.arch != \"\" {\n\t\treturn",
"video": ""
} | {
"audio": "",
"image": "",
"text": " p.arch\n\t}\n\treturn arch.HostArch()\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " {\n\treturn func(p *Prompt) error {\n\t\tp.keyBindMode = m\n\t\treturn nil\n\t}\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (p CreateMachineParams) ValidateDomainParams() error {\n\tif p.Hostname == \"\" {\n\t\treturn errors.Errorf(\"missing required hostname\")\n\t}\n\tif len(p.disks) < 2 {\n\t\t// We need at least the drive and the data source disk.\n\t\treturn errors.Errorf(\"got %d disks, ... | {
"audio": "",
"image": "",
"text": "\t\t}\n\t\tif d.Driver() == \"raw\" {\n\t\t\tds = true\n\t\t}\n\t}\n\tif !ds {\n\t\treturn errors.Trace(errors.Errorf(\"missing data source disk\"))\n\t}\n\tif !fs {\n\t\treturn errors.Trace(errors.Errorf(\"missing system disk\"))\n\t}\n\treturn nil\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " if len(comment) == 3 {\n\t\t\t_ = p.googleBot()\n\t\t}\n\t} else if len(comment) > 0 {\n\t\tif len(comment) > 3 {\n\t\t\tp.localization = comment[3]\n\t\t}\n\t\tif strings.HasPrefix(comment[0], \"Windows NT\") {\n\t\t\tp.os = normalizeOS(comment[0])\n\t\t} else if len(comment... |
{
"audio": "",
"image": "",
"text": "func CreateMachine(params CreateMachineParams) error {\n\tif params.Hostname == \"\" {\n\t\treturn fmt.Errorf(\"hostname is required\")\n\t}\n\n\tsetDefaults(¶ms)\n\n\ttemplateDir := filepath.Dir(params.UserDataFile)\n\n\terr := writeMetadata(templateDir)\n\tif err != nil ... | {
"audio": "",
"image": "",
"text": " err != nil {\n\t\treturn errors.Annotatef(err, \"failed to write domain xml for %q\", params.Host())\n\t}\n\n\tout, err := params.runCmdAsRoot(\"\", virsh, \"define\", domainPath)\n\tif err != nil {\n\t\treturn errors.Annotatef(err, \"failed to defined the domain for %q from ... | {
"audio": "",
"image": "",
"text": " bridge,\n\t\tMemory: params.Memory,\n\t\tCpuCores: params.CpuCores,\n\t\tRootDisk: params.RootDisk,\n\t\tInterfaces: interfaces,\n\t}); err != nil {\n\t\treturn err\n\t}\n\n\tlogger.Debugf(\"Set machine %s to autostart\", c.name)\n\tif para... |
{
"audio": "",
"image": "",
"text": "func setDefaults(p *CreateMachineParams) {\n\tif p.findPath == nil {\n\t\tp.findPath = paths.DataDir\n\t}\n\tif p.runCmd == nil {\n",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\t\tp.runCmd = runAsLibvirt\n\t}\n\tif p.runCmdAsRoot == nil {\n\t\tp.runCmdAsRoot = run\n\t}\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " if len(comment) == 3 {\n\t\t\t_ = p.googleBot()\n\t\t}\n\t} else if len(comment) > 0 {\n\t\tif len(comment) > 3 {\n\t\t\tp.localization = comment[3]\n\t\t}\n\t\tif strings.HasPrefix(comment[0], \"Windows NT\") {\n\t\t\tp.os = normalizeOS(comment[0])\n\t\t} else if len(comment... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.