Documentation
¶
Overview ¶
DigitalRebar Provision CLI provides the core parts of the CLI. This CLI uses an access core based upon a set of generated files from the generated swagger.json file.
Copyright © 2020 RackN <support@rackn.com>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- Variables
- func AddDirToZip(zipWriter *zip.Writer, dirname string) error
- func AddFileToZip(zipWriter *zip.Writer, filename string) error
- func NewApp() *cobra.Command
- func NewBasicKeyRequest() *basicKeyReq
- func PatchWithFunction(key string, op *ops, fn func(models.Model) (models.Model, bool)) error
- func PatchWithString(key, js string, op *ops) error
- func ResetDefaults()
- type DocData
- type Item
- type LabDocData
- func (dd *LabDocData) Encapsulate(str, first, pat string) string
- func (dd *LabDocData) GenerateLabMd() string
- func (dd *LabDocData) GenerateSectionMarkdown(section *models.LabSection, depth int, inTab bool) string
- func (dd *LabDocData) LengthString(str, pat string) string
- func (dd *LabDocData) MarkdownToRst(data string) string
- func (dd *LabDocData) RenderSection(tmplFile string, ls *models.LabSection, depth int, tab string) string
- func (dd *LabDocData) StringCleanup(str string) string
- func (dd *LabDocData) ToRef(names ...string) string
- type Output
- type PackID
- type RefKind
- type RefLoc
- type Service
- type Services
- type Warning
Constants ¶
const ( AgentConfigFileName = "agent-cfg.yml" AgentConfigFileMode = 0600 )
Variables ¶
var ( // ActuallyPowerThings is a boolean to use in testing to keep from power off the test machine ActuallyPowerThings = true // DefaultStateLoc is the default location to save agent state DefaultStateLoc string AgentName = "drp-agent" )
var AllKinds = []RefKind{ KindTemplate, KindParam, KindStage, KindTask, KindBootEnv, KindContext, KindProfile, KindWorkflow, KindBlueprint, KindTrigger, }
AllKinds is the canonical list of reference kinds. Add new kinds here and they’ll automatically be picked up everywhere.
var AllowedCallsFields = map[string]info{ "Param": {/* contains filtered or unexported fields */}, "ParamExists": {/* contains filtered or unexported fields */}, "ParamExpand": {/* contains filtered or unexported fields */}, "ParamAsJSON": {/* contains filtered or unexported fields */}, "ParamAsYAML": {/* contains filtered or unexported fields */}, "ParamCompose": {/* contains filtered or unexported fields */}, "ParamComposeExpand": {/* contains filtered or unexported fields */}, "ComposeParam": {/* contains filtered or unexported fields */}, "ExpandParam": {/* contains filtered or unexported fields */}, "CallTemplate": {/* contains filtered or unexported fields */}, "CurrentJob": {/* contains filtered or unexported fields */}, "GenerateInfiniteToken": {/* contains filtered or unexported fields */}, "GenerateCreateOrMachineToken": {/* contains filtered or unexported fields */}, "GenerateInfiniteMachineToken": {/* contains filtered or unexported fields */}, "GenerateJobToken": {/* contains filtered or unexported fields */}, "GenerateToken": {/* contains filtered or unexported fields */}, "GenerateUserToken": {/* contains filtered or unexported fields */}, "GenerateProfileToken": {/* contains filtered or unexported fields */}, "BootParams": {/* contains filtered or unexported fields */}, "ProvisionerAddress": {/* contains filtered or unexported fields */}, "ProvisionerURL": {/* contains filtered or unexported fields */}, "ProvisionerHostURL": {/* contains filtered or unexported fields */}, "SecureProvisionerURL": {/* contains filtered or unexported fields */}, "SecureProvisionerHostURL": {/* contains filtered or unexported fields */}, "BootParamsFor": {/* contains filtered or unexported fields */}, "ApiURL": {/* contains filtered or unexported fields */}, "MachineRepos": {/* contains filtered or unexported fields */}, "InstallRepos": {/* contains filtered or unexported fields */}, "Tasks": {/* contains filtered or unexported fields */}, "CurrentTask": {/* contains filtered or unexported fields */}, "NetmaskToCIDR": {/* contains filtered or unexported fields */}, "Machine": { // contains filtered or unexported fields }, "Env": { // contains filtered or unexported fields }, "WorkOrder": { // contains filtered or unexported fields }, "ObjectExpand": {/* contains filtered or unexported fields */}, "StringExpand": {/* contains filtered or unexported fields */}, "ServerPathInfo": { // contains filtered or unexported fields }, "Info": { // contains filtered or unexported fields }, }
var ( // Session is the global client access session Session *api.Client )
Functions ¶
func AddDirToZip ¶
given a top level dir this will walk it adding files and folders. to the archive
func AddFileToZip ¶
adds an individual file to the archive
func NewBasicKeyRequest ¶
func NewBasicKeyRequest() *basicKeyReq
NewBasicKeyRequest returns a default BasicKeyRequest.
func PatchWithFunction ¶
The input function takes the object and returns the modified object and if the object changed.
func PatchWithString ¶
func ResetDefaults ¶
func ResetDefaults()
Types ¶
type DocData ¶
type DocData struct {
Name string
Prefix string
RefName string
RefPrefix string
DisplayName string
Full string
Version string
Documentation string
Description string
Content string
RefString string
Objects [][]models.Model
}
func (*DocData) LengthString ¶
func (*DocData) PrefixToTag ¶ added in v4.12.0
type Item ¶ added in v4.15.0
type Item struct {
Name string
Version string
CatalogEntry *models.CatalogItem
}
type LabDocData ¶ added in v4.10.0
type LabDocData struct {
Lab *models.Lab
LabSection *models.LabSection
Depth int
InTab bool
VideoTag string
VideoTime string
}
func (*LabDocData) Encapsulate ¶ added in v4.10.0
func (dd *LabDocData) Encapsulate(str, first, pat string) string
func (*LabDocData) GenerateLabMd ¶ added in v4.13.0
func (dd *LabDocData) GenerateLabMd() string
func (*LabDocData) GenerateSectionMarkdown ¶ added in v4.13.0
func (dd *LabDocData) GenerateSectionMarkdown(section *models.LabSection, depth int, inTab bool) string
func (*LabDocData) LengthString ¶ added in v4.10.0
func (dd *LabDocData) LengthString(str, pat string) string
func (*LabDocData) MarkdownToRst ¶ added in v4.10.0
func (dd *LabDocData) MarkdownToRst(data string) string
func (*LabDocData) RenderSection ¶ added in v4.10.0
func (dd *LabDocData) RenderSection(tmplFile string, ls *models.LabSection, depth int, tab string) string
func (*LabDocData) StringCleanup ¶ added in v4.13.0
func (dd *LabDocData) StringCleanup(str string) string
StringCleanup removes new lines and replaces them with a single space. Also doesn't change it if it contains a table.
func (*LabDocData) ToRef ¶ added in v4.10.0
func (dd *LabDocData) ToRef(names ...string) string
type Output ¶ added in v4.16.0
type Output struct {
Index map[RefKind]map[string][]RefLoc `json:"index"`
RevIndex map[RefKind]map[string][]RefLoc `json:"rev_index"`
Summary struct {
Packs int `json:"packs"`
Objects int `json:"objects"`
TemplateRefs int `json:"templateRefs"`
ParamRefs int `json:"paramRefs"`
StageRefs int `json:"stageRefs"`
TaskRefs int `json:"taskRefs"`
BootenvRefs int `json:"bootenvRefs"`
ContextRefs int `json:"contextRefs"`
ProfileRefs int `json:"profileRefs"`
UniqueTemplates int `json:"uniqueTemplates"`
UniqueParams int `json:"uniqueParams"`
UniqueProfiles int `json:"uniqueProfiles"`
} `json:"summary"`
}
Output aggregates a normalized reverse index and summary
type RefKind ¶ added in v4.16.0
type RefKind string
Normalized kinds for a unified index
const ( KindTemplate RefKind = "templates" KindParam RefKind = "params" KindStage RefKind = "stages" KindTask RefKind = "tasks" KindBootEnv RefKind = "bootenvs" KindContext RefKind = "contexts" KindProfile RefKind = "profiles" KindWorkflow RefKind = "workflows" KindBlueprint RefKind = "blueprints" KindTrigger RefKind = "triggers" )
Source Files
¶
- actionHelper.go
- activities.go
- agent.go
- airgap.go
- alerts.go
- analyze.go
- appleNBI.go
- archive.go
- assets.go
- batches.go
- blueprints.go
- bootenv.go
- bootenvHelper.go
- catalog.go
- catalog_items.go
- certs.go
- clusters.go
- commandHelper.go
- common.go
- config.go
- connection.go
- content-archive.go
- contents.go
- contexts.go
- debug.go
- doc.go
- endpoints.go
- events.go
- extended.go
- files.go
- filters.go
- generate.go
- git.go
- gohai_other.go
- identity_providers.go
- info.go
- inspect.go
- instances.go
- interfaces.go
- isos.go
- jobs.go
- labs.go
- lease.go
- license.go
- load.go
- logs.go
- machines.go
- metaHelper.go
- netwrangle.go
- new_common.go
- objects.go
- paramHelper.go
- params.go
- plugin_providers.go
- plugins.go
- pools.go
- preflight.go
- prefs.go
- process_jobs.go
- profileHelper.go
- profiles.go
- reapchildren_unix.go
- reservation.go
- resource_brokers.go
- roles.go
- stages.go
- startup.go
- static.go
- store-objects.go
- subnet.go
- support.go
- system.go
- taskHelper.go
- tasks.go
- template.go
- tenant.go
- trigger_providers.go
- triggers.go
- user.go
- utils.go
- ux_options.go
- ux_settings.go
- ux_views.go
- version_sets.go
- workOrderHelper.go
- work_orders.go
- workflows.go
- zones.go