iuf

package
v0.11.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 25, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

* * MIT License * * (C) Copyright 2022 Hewlett Packard Enterprise Development LP * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. *

* * MIT License * * (C) Copyright 2022 Hewlett Packard Enterprise Development LP * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. *

* * MIT License * * (C) Copyright 2022 Hewlett Packard Enterprise Development LP * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. *

* * MIT License * * (C) Copyright 2022 Hewlett Packard Enterprise Development LP * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. *

* * MIT License * * (C) Copyright 2022 Hewlett Packard Enterprise Development LP * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. *

* * MIT License * * (C) Copyright 2022 Hewlett Packard Enterprise Development LP * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. *

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Validate added in v0.3.0

func Validate(file_contents []byte) error

func ValidateFile added in v0.3.2

func ValidateFile(file_path string) error

Types

type Activity

type Activity struct {
	Name             string                 `json:"name"`                                                                                      // Name of activity
	InputParameters  InputParameters        `json:"input_parameters" binding:"required"`                                                       // Input parameters by admin
	SiteParameters   SiteParameters         `json:"site_parameters" binding:"required"`                                                        // Site parameters set by the admin
	OperationOutputs map[string]interface{} `json:"operation_outputs" binding:"required"`                                                      // Operation outputs from argo
	Products         []Product              `json:"products" binding:"required"`                                                               // List of products included in an activity
	ActivityState    ActivityState          `json:"activity_state" binding:"required" enums:"paused,in_progress,debug,blocked,wait_for_admin"` // State of activity

} //	@name	Activity

Activity

type ActivityState added in v0.3.1

type ActivityState string
const (
	ActivityStateInProgress   ActivityState = "in_progress"
	ActivityStatePaused       ActivityState = "paused"
	ActivityStateDebug        ActivityState = "debug"
	ActivityStateBlocked      ActivityState = "blocked"
	ActivityStateWaitForAdmin ActivityState = "wait_for_admin"
)

type CreateActivityRequest added in v0.3.1

type CreateActivityRequest struct {
	Name          string        `json:"name" binding:"required"` // Name of activity
	ActivityState ActivityState `json:"activity_state" swaggerignore:"true"`

} //	@name	Activity.CreateActivityRequest

type EManagedRolloutStrategy added in v0.9.17

type EManagedRolloutStrategy string
const (
	EManagedRolloutStrategyReboot EManagedRolloutStrategy = "reboot"
	EManagedRolloutStrategyStaged EManagedRolloutStrategy = "stage"
)

type History added in v0.3.1

type History struct {
	ActivityState ActivityState `json:"activity_state" binding:"required" enums:"paused,in_progress,debug,blocked,wait_for_admin"` // State of activity
	SessionName   string        `json:"session_name"`                                                                              // Name of the session
	StartTime     int32         `json:"start_time"`                                                                                // Epoch timestamp
	Comment       string        `json:"comment"`                                                                                   // Comment
	Name          string        `json:"name"`                                                                                      // Comment

} //	@name	History

History

type HistoryAbortRequest added in v0.9.17

type HistoryAbortRequest struct {
	Comment string `json:"comment"` // Comment
	Force   bool   `json:"force"`   // Force terminate Argo workflows non-gracefully

} //	@name	History.HistoryAbortRequest

type HistoryActionRequest added in v0.3.1

type HistoryActionRequest struct {
	Comment string `json:"comment"` // Comment

} //	@name	History.HistoryActionRequest

type HistoryRestartRequest added in v0.9.21

type HistoryRestartRequest struct {
	Comment string `json:"comment"` // Comment
	Force   bool   `json:"force"`   // Force all operations to be re-executed irrespective if they have been successful in the past

} //	@name	History.HistoryRestartRequest

type HistoryRunActionRequest added in v0.3.4

type HistoryRunActionRequest struct {
	InputParameters InputParameters `json:"input_parameters" binding:"required"`
	SiteParameters  SiteParameters  `json:"site_parameters"`
	Comment         string          `json:"comment" validate:"optional"` // Comment

} //	@name	History.HistoryRunActionRequest

type InputParameters added in v0.3.1

type InputParameters struct {
	MediaDir                              string                  `json:"media_dir"`                                     // Location of media
	SiteParameters                        string                  `json:"site_parameters"`                               // DEPRECATED: use site_parameters at the top level of the activity or session resource. The inline contents of the site_parameters.yaml file.
	LimitManagementNodes                  []string                `json:"limit_management_nodes"`                        // Must in the form <role>_<subrole>. E.g. Management_Master, Management_Worker, Management_Storage
	LimitManagedNodes                     []string                `json:"limit_managed_nodes"`                           // Anything accepted by BOS v2 as the value to a session's limit parameter.
	ManagedRolloutStrategy                EManagedRolloutStrategy `json:"managed_rollout_strategy" enums:"reboot,stage"` // Whether to use a reboot or staged rollout strategy for managed nodes. Refer to BOS v2 for more details.
	ConcurrentManagementRolloutPercentage int64                   `json:"concurrent_management_rollout_percentage"`      // The percentage of management nodes to reboot in parallel before moving on to the next set of management nodes to reboot.
	MediaHost                             string                  `json:"media_host"`                                    // A string containing the hostname of where the media is located
	Concurrency                           int64                   `json:"concurrency"`                                   // An integer defining how many products / operations can we concurrently execute.
	BootprepConfigManaged                 string                  `json:"bootprep_config_managed"`                       // The path to the bootprep config file for managed nodes, relative to the media_dir
	BootprepConfigManagement              string                  `json:"bootprep_config_management"`                    // The path to the bootprep config file for management nodes, relative to the media_dir
	Stages                                []string                `json:"stages"`                                        // Stages to execute
	Force                                 bool                    `json:"force"`                                         // Force re-execution of stage operations

} //	@name	InputParameters

type InputParametersPatch added in v0.10.9

type InputParametersPatch struct {
	MediaDir                              *string                  `json:"media_dir"`                                     // Location of media
	SiteParameters                        *string                  `json:"site_parameters"`                               // DEPRECATED: use site_parameters at the top level of the activity or session resource. The inline contents of the site_parameters.yaml file.
	LimitManagementNodes                  *[]string                `json:"limit_management_nodes"`                        // Must in the form <role>_<subrole>. E.g. Management_Master, Management_Worker, Management_Storage
	LimitManagedNodes                     *[]string                `json:"limit_managed_nodes"`                           // Anything accepted by BOS v2 as the value to a session's limit parameter.
	ManagedRolloutStrategy                *EManagedRolloutStrategy `json:"managed_rollout_strategy" enums:"reboot,stage"` // Whether to use a reboot or staged rollout strategy for managed nodes. Refer to BOS v2 for more details.
	ConcurrentManagementRolloutPercentage *int64                   `json:"concurrent_management_rollout_percentage"`      // The percentage of management nodes to reboot in parallel before moving on to the next set of management nodes to reboot.
	MediaHost                             *string                  `json:"media_host"`                                    // A string containing the hostname of where the media is located
	Concurrency                           *int64                   `json:"concurrency"`                                   // An integer defining how many products / operations can we concurrently execute.
	BootprepConfigManaged                 *string                  `json:"bootprep_config_managed"`                       // The path to the bootprep config file for managed nodes, relative to the media_dir
	BootprepConfigManagement              *string                  `json:"bootprep_config_management"`                    // The path to the bootprep config file for management nodes, relative to the media_dir
	Stages                                *[]string                `json:"stages"`                                        // Stages to execute
	Force                                 *bool                    `json:"force"`                                         // Force re-execution of stage operations

} //	@name	InputParameters

type ManifestHookScript added in v0.9.13

type ManifestHookScript struct {
	ScriptPath       string `json:"script_path"`
	ExecutionContext string `json:"execution_context"`
}

type ManifestStageHooks added in v0.9.13

type ManifestStageHooks struct {
	PreHook  ManifestHookScript `json:"pre"`
	PostHook ManifestHookScript `json:"post"`
}

type Operations added in v0.4.0

type Operations struct {
	Name                              string                 `yaml:"name" json:"name" binding:"required"` // Name of the operation
	StaticParameters                  map[string]interface{} `yaml:"static-parameters" json:"static-parameters" binding:"required"`
	RequiredManifestAttributes        []string               `yaml:"required-manifest-attributes" json:"required-manifest-attributes"`
	IncludeDefaultProductInSiteParams bool                   `yaml:"include-default-product-in-site-params" json:"include-default-product-in-site-params"`

} //	@name	Operations

type PatchActivityRequest added in v0.3.1

type PatchActivityRequest struct {
	InputParameters InputParametersPatch `json:"input_parameters"`
	SiteParameters  SiteParameters       `json:"site_parameters"`
	ActivityState   ActivityState        `json:"activity_state" enums:"paused,in_progress,debug,blocked,wait_for_admin"` // State of activity

} //	@name	Activity.PatchActivityRequest

type Product

type Product struct {
	Name             string `json:"name" validate:"required"`               // The name of the product
	Version          string `json:"version" validate:"required"`            // The version of the product.
	OriginalLocation string `json:"original_location"  validate:"required"` // The original location of the extracted tar in on the physical storage.
	Validated        bool   `json:"validated"  validate:"required"`         // The flag indicates md5 of a product tarball file has been validated
	Manifest         string `json:"manifest"`                               // the content of manifest

} //	@name	Product

type ReplaceHistoryCommentRequest added in v0.3.1

type ReplaceHistoryCommentRequest struct {
	Comment string `json:"comment"` // Comment

} //	@name	History.ReplaceHistoryCommentRequest

type Session added in v0.3.1

type Session struct {
	InputParameters InputParameters   `json:"input_parameters"`
	SiteParameters  SiteParameters    `json:"site_parameters"`
	CurrentState    SessionState      `json:"current_state" enums:"paused,in_progress,debug,completed,aborted"`
	CurrentStage    string            `json:"stage"`
	Workflows       []SessionWorkflow `json:"workflows"`
	Products        []Product         `json:"products" validate:"required"`
	Name            string            `json:"name"`
	ActivityRef     string            `json:"activityRef" swaggerignore:"true"`

} //	@name	Session

IufSession

type SessionState added in v0.3.1

type SessionState string
const (
	SessionStateInProgress    SessionState = "in_progress"
	SessionStateTransitioning SessionState = "transitioning"
	SessionStatePaused        SessionState = "paused"
	SessionStateDebug         SessionState = "debug"
	SessionStateCompleted     SessionState = "completed"
	SessionStateAborted       SessionState = "aborted"
)

type SessionWorkflow added in v0.3.1

type SessionWorkflow struct {
	Id  string `json:"id"`  // id of argo workflow
	Url string `json:"url"` // url to the argo workflow

} //	@name	Session.Workflow

type SiteParameters added in v0.9.13

type SiteParameters struct {
	Global   map[string]interface{}            `json:"global"`   // global parameters applicable to all products
	Products map[string]map[string]interface{} `json:"products"` // Product-specific parameters

} //	@name	SiteParameters

type SiteParametersForOperationsAndHooks added in v0.9.13

type SiteParametersForOperationsAndHooks struct {
	SiteParameters
	CurrentProduct map[string]interface{} `json:"current_product"` // Current product's site parameters.

} //	@name	SiteParametersForOperationsAndHooks

type Stage added in v0.4.0

type Stage struct {
	Name                               string       `yaml:"name" json:"name" binding:"required"`                                                // Name of the stage
	Type                               string       `yaml:"type" json:"type" binding:"required"`                                                // Type of the stage
	Operations                         []Operations `yaml:"operations" json:"operations" binding:"required"`                                    // operations
	NoHooks                            bool         `yaml:"no-hooks" json:"no-hooks"`                                                           // no-hook indicates that there are no hooks that should be run for this stage
	ProcessProductVariantsSequentially bool         `yaml:"process-product-variants-sequentially" json:"process-product-variants-sequentially"` // this stage wants to make sure all products with the same name (but different versions) are processed sequentially, not in parallel, to avoid operational race conditions

} //	@name	Stage

Stage

type Stages added in v0.4.0

type Stages struct {
	Version string            `yaml:"version" json:"version" binding:"required"`
	Stages  []Stage           `yaml:"stages" json:"stages" binding:"required"`
	Hooks   map[string]string `yaml:"hooks" json:"hooks"`

} //	@name	Stages

type SyncRequest added in v0.4.0

type SyncRequest struct {
	Object core_v1.ConfigMap `json:"object"`
}

type SyncResponse added in v0.4.0

type SyncResponse struct {
	ResyncAfterSeconds int `json:"resyncAfterSeconds,omitempty"`
}

type WorkflowSyncRequest added in v0.9.17

type WorkflowSyncRequest struct {
	Object v1alpha1.Workflow `json:"object"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL