Class NamespaceCloud.DescriptorImpl

java.lang.Object
hudson.model.Descriptor<Cloud>
io.jenkins.plugins.namespacecloud.NamespaceCloud.DescriptorImpl
All Implemented Interfaces:
Saveable, Loadable, OnMaster
Enclosing class:
NamespaceCloud

@Extension @Symbol("namespace") public static class NamespaceCloud.DescriptorImpl extends Descriptor<Cloud>
  • Constructor Details

    • DescriptorImpl

      public DescriptorImpl()
  • Method Details

    • getDisplayName

      @NonNull public String getDisplayName()
      Overrides:
      getDisplayName in class Descriptor<Cloud>
    • doFillCredentialsIdItems

      @POST public ListBoxModel doFillCredentialsIdItems(@AncestorInPath Item item, @QueryParameter String credentialsId)
    • doCheckRegistryPrefix

      public FormValidation doCheckRegistryPrefix(@QueryParameter String value, @QueryParameter String credentialsId)
      Validates the Project ID, including against the registry itself.

      Format errors are caught locally; correctness is checked by asking the registry for a repository known to exist, because the gRPC API is tenant-scoped by the token and cannot reveal a wrong prefix.

    • doFillRegionItems

      @POST public ListBoxModel doFillRegionItems()
    • doCheckComputeEndpointOverride

      @POST public FormValidation doCheckComputeEndpointOverride(@QueryParameter String value)
    • doTestConnection

      public FormValidation doTestConnection(@QueryParameter String region, @QueryParameter String computeEndpointOverride, @QueryParameter String registryPrefix, @QueryParameter String credentialsId)
      Verifies the token can actually reach Namespace, and reports precisely which grants are missing when it cannot.

      The probe is ListInstances: it is read-only, creates nothing, and needs only instance:list. DescribePolicies would be the obvious call but it requires an admin-scoped token, so a correctly least-privileged Jenkins token would fail it.

    • getNscTokenCommand

      public String getNscTokenCommand()
      Shown on the configuration page so the operator can mint the right token.
    • getRequiredGrants

      public List<RequiredGrants.Grant> getRequiredGrants()