diff --git a/lib/apiservers/service/restapi/handlers/common.go b/lib/apiservers/service/restapi/handlers/common.go index fef00fc8af..d2f93799d1 100644 --- a/lib/apiservers/service/restapi/handlers/common.go +++ b/lib/apiservers/service/restapi/handlers/common.go @@ -104,7 +104,7 @@ func validateTarget(ctx context.Context, d *data.Data) (*validate.Validator, err return validator, nil } -// Copied from list.go, and appears to be present other places. TODO: deduplicate +// Copied from list.go, and appears to be present other places. TODO (#6032): deduplicate func upgradeStatusMessage(op trace.Operation, vch *vm.VirtualMachine, installerVer *version.Build, vchVer *version.Build) string { if sameVer := installerVer.Equal(vchVer); sameVer { return "Up to date" @@ -139,7 +139,7 @@ func upgradeStatusMessage(op trace.Operation, vch *vm.VirtualMachine, installerV } func getVCHConfig(op trace.Operation, d *data.Data) (*config.VirtualContainerHostConfigSpec, error) { - // TODO(jzt): abstract some of this boilerplate into helpers + // TODO (#6032): abstract some of this boilerplate into helpers validator, err := validateTarget(op.Context, d) if err != nil { return nil, util.WrapError(http.StatusBadRequest, err) diff --git a/lib/apiservers/service/restapi/handlers/vch_create.go b/lib/apiservers/service/restapi/handlers/vch_create.go index 95b07657a4..b20163d73b 100644 --- a/lib/apiservers/service/restapi/handlers/vch_create.go +++ b/lib/apiservers/service/restapi/handlers/vch_create.go @@ -163,7 +163,7 @@ func setUpLogger() *os.File { func buildCreate(op trace.Operation, d *data.Data, finder *find.Finder, vch *models.VCH) (*create.Create, error) { c := &create.Create{Data: d} - // TODO: deduplicate with create.processParams + // TODO (#6032): deduplicate with create.processParams if vch != nil { if vch.Version != "" && version.String() != string(vch.Version) { @@ -172,7 +172,7 @@ func buildCreate(op trace.Operation, d *data.Data, finder *find.Finder, vch *mod c.DisplayName = vch.Name - // TODO: move validation to swagger + // TODO (#6710): move validation to swagger if err := common.CheckUnsupportedChars(c.DisplayName); err != nil { return nil, util.NewError(http.StatusBadRequest, fmt.Sprintf("Invalid display name: %s", err)) } @@ -196,7 +196,7 @@ func buildCreate(op trace.Operation, d *data.Data, finder *find.Finder, vch *mod c.ResourceLimits.VCHMemoryShares = fromShares(vch.Compute.Memory.Shares) } - resourcePath, err := fromManagedObject(op, finder, "ResourcePool", vch.Compute.Resource) // TODO: Do we need to handle clusters differently? + resourcePath, err := fromManagedObject(op, finder, "ResourcePool", vch.Compute.Resource) // TODO (#6711): Do we need to handle clusters differently? if err != nil { return nil, util.NewError(http.StatusBadRequest, fmt.Sprintf("Error finding resource pool: %s", err)) } @@ -326,7 +326,7 @@ func buildCreate(op trace.Operation, d *data.Data, finder *find.Finder, vch *mod if vch.Storage != nil { if vch.Storage.ImageStores != nil && len(vch.Storage.ImageStores) > 0 { - c.ImageDatastorePath = vch.Storage.ImageStores[0] // TODO: many vs. one mismatch + c.ImageDatastorePath = vch.Storage.ImageStores[0] // TODO (#6712): many vs. one mismatch } if err := common.CheckUnsupportedCharsDatastore(c.ImageDatastorePath); err != nil { @@ -407,7 +407,7 @@ func buildCreate(op trace.Operation, d *data.Data, finder *find.Finder, vch *mod c.InsecureRegistries = vch.Registry.Insecure c.WhitelistRegistries = vch.Registry.Whitelist - //params.Vch.Registry.Blacklist + //TODO (#6713): params.Vch.Registry.Blacklist c.RegistryCAs = fromPemCertificates(vch.Registry.CertificateAuthorities) @@ -452,7 +452,7 @@ func handleCreate(op trace.Operation, c *create.Create, validator *validate.Vali vConfig := validator.AddDeprecatedFields(validator.Context, vchConfig, c.Data) - // TODO: make this configurable + // TODO (#6714): make this configurable images := common.Images{} vConfig.ImageFiles, err = images.CheckImagesFiles(true) vConfig.ApplianceISO = path.Base(images.ApplianceISO) @@ -523,7 +523,7 @@ func fromGateway(m *models.Gateway) string { return "" } - return fmt.Sprintf("%s:%s", // TODO: what if RoutingDestinations is empty? + return fmt.Sprintf("%s:%s", // TODO (#6715): what if RoutingDestinations is empty? strings.Join(*fromIPRanges(&m.RoutingDestinations), ","), m.Address, ) diff --git a/lib/apiservers/service/restapi/handlers/vch_get.go b/lib/apiservers/service/restapi/handlers/vch_get.go index 2395821cd4..a2a8feffc4 100644 --- a/lib/apiservers/service/restapi/handlers/vch_get.go +++ b/lib/apiservers/service/restapi/handlers/vch_get.go @@ -394,7 +394,7 @@ func mobidToID(mobid string) string { moref := new(types.ManagedObjectReference) ok := moref.FromString(mobid) if !ok { - return "" // TODO: Handle? (We probably don't want to let this fail the request, but may want to convey that something unexpected happened.) + return "" // TODO (#6717): Handle? (We probably don't want to let this fail the request, but may want to convey that something unexpected happened.) } return moref.Value @@ -409,7 +409,7 @@ func asPemCertificates(certificates []byte) []*models.X509Data { err := pem.Encode(&buf, b) if err != nil { - continue // TODO: Handle? (We probably don't want to let this fail the request, but may want to convey that something unexpected happened.) + continue // TODO (#6716): Handle? (We probably don't want to let this fail the request, but may want to convey that something unexpected happened.) } m = append(m, &models.X509Data{ @@ -426,7 +426,7 @@ func asPemCertificate(certificates []byte) *models.X509Data { m := asPemCertificates(certificates) if len(m) > 1 { - // TODO: Error? (We probably don't want to let this fail the request, but may want to convey that something unexpected happened.) + // TODO (#6716): Error? (We probably don't want to let this fail the request, but may want to convey that something unexpected happened.) } return m[0] diff --git a/lib/apiservers/service/restapi/handlers/vch_log_get.go b/lib/apiservers/service/restapi/handlers/vch_log_get.go index 5a32443e15..141131af9e 100644 --- a/lib/apiservers/service/restapi/handlers/vch_log_get.go +++ b/lib/apiservers/service/restapi/handlers/vch_log_get.go @@ -114,7 +114,7 @@ func (h *VCHDatacenterLogGet) Handle(params operations.GetTargetTargetDatacenter // getDatastoreHelper validates the VCH and returns the datastore helper for the VCH. It errors when validation fails or when datastore is not ready func getDatastoreHelper(op trace.Operation, d *data.Data) (*datastore.Helper, error) { - // TODO (angiew): abstract some of the boilerplate into helpers in common.go + // TODO (#6032): abstract some of the boilerplate into helpers in common.go validator, err := validateTarget(op, d) if err != nil { return nil, util.WrapError(http.StatusBadRequest, err)