Documentation ¶
Index ¶
- Constants
- func GetSortedTemplateForApp(appName, p, ca, v, rName, cp, namespace string, ...) ([]helm.KubernetesResourceTemplate, error)
- type App
- type AppClient
- func (v *AppClient) CreateApp(a App, ac AppContent, p string, cN string, cV string, exists bool) (App, error)
- func (v *AppClient) DeleteApp(name string, p string, cN string, cV string) error
- func (v *AppClient) GetApp(name string, p string, cN string, cV string) (App, error)
- func (v *AppClient) GetAppContent(name string, p string, cN string, cV string) (AppContent, error)
- func (v *AppClient) GetApps(project, compositeApp, compositeAppVersion string) ([]App, error)
- type AppClusterInfo
- type AppContent
- type AppContextKey
- type AppIntent
- type AppIntentClient
- func (c *AppIntentClient) CreateAppIntent(a AppIntent, p string, ca string, v string, i string, digName string) (AppIntent, error)
- func (c *AppIntentClient) DeleteAppIntent(ai string, p string, ca string, v string, i string, digName string) error
- func (c *AppIntentClient) GetAllAppIntents(p, ca, v, i, digName string) ([]AppIntent, error)
- func (c *AppIntentClient) GetAllIntentsByApp(aN, p, ca, v, i, digName string) (SpecData, error)
- func (c *AppIntentClient) GetAppIntent(ai string, p string, ca string, v string, i string, digName string) (AppIntent, error)
- type AppIntentFindByAppKey
- type AppIntentKey
- type AppIntentManager
- type AppIntentQueryKey
- type AppKey
- type AppManager
- type AppMetaData
- type AppProfile
- type AppProfileClient
- func (c *AppProfileClient) CreateAppProfile(project, compositeApp, compositeAppVersion, compositeProfile string, ...) (AppProfile, error)
- func (c *AppProfileClient) DeleteAppProfile(project, compositeApp, compositeAppVersion, compositeProfile, profile string) error
- func (c *AppProfileClient) GetAppProfile(project, compositeApp, compositeAppVersion, compositeProfile, profile string) (AppProfile, error)
- func (c *AppProfileClient) GetAppProfileByApp(project, compositeApp, compositeAppVersion, compositeProfile, appName string) (AppProfile, error)
- func (c *AppProfileClient) GetAppProfileContent(project, compositeApp, compositeAppVersion, compositeProfile, profile string) (AppProfileContent, error)
- func (c *AppProfileClient) GetAppProfileContentByApp(project, compositeApp, compositeAppVersion, compositeProfile, appName string) (AppProfileContent, error)
- func (c *AppProfileClient) GetAppProfiles(project, compositeApp, compositeAppVersion, compositeProfile string) ([]AppProfile, error)
- type AppProfileContent
- type AppProfileFindByAppKey
- type AppProfileKey
- type AppProfileManager
- type AppProfileMetadata
- type AppProfileQueryKey
- type AppProfileSpec
- type ApplicationsAndClusterInfo
- type Client
- type Cluster
- type ClusterClient
- func (v *ClusterClient) CreateCluster(project, logicalCloud string, c Cluster) (Cluster, error)
- func (v *ClusterClient) DeleteCluster(project, logicalCloud, clusterReference string) error
- func (v *ClusterClient) GetAllClusters(project, logicalCloud string) ([]Cluster, error)
- func (v *ClusterClient) GetCluster(project, logicalCloud, clusterReference string) (Cluster, error)
- func (v *ClusterClient) GetClusterConfig(project, logicalCloud, clusterReference string) (string, error)
- func (v *ClusterClient) UpdateCluster(project, logicalCloud, clusterReference string, c Cluster) (Cluster, error)
- type ClusterKey
- type ClusterManager
- type ClusterMeta
- type ClusterSpec
- type CompositeApp
- type CompositeAppClient
- func (v *CompositeAppClient) CreateCompositeApp(c CompositeApp, p string, exists bool) (CompositeApp, error)
- func (v *CompositeAppClient) DeleteCompositeApp(name string, version string, p string) error
- func (v *CompositeAppClient) GetAllCompositeApps(p string) ([]CompositeApp, error)
- func (v *CompositeAppClient) GetCompositeApp(name string, version string, p string) (CompositeApp, error)
- type CompositeAppKey
- type CompositeAppManager
- type CompositeAppMetaData
- type CompositeAppSpec
- type CompositeProfile
- type CompositeProfileClient
- func (c *CompositeProfileClient) CreateCompositeProfile(cpf CompositeProfile, p string, ca string, v string, exists bool) (CompositeProfile, error)
- func (c *CompositeProfileClient) DeleteCompositeProfile(cpf string, p string, ca string, v string) error
- func (c *CompositeProfileClient) GetCompositeProfile(cpf string, p string, ca string, v string) (CompositeProfile, error)
- func (c *CompositeProfileClient) GetCompositeProfiles(p string, ca string, v string) ([]CompositeProfile, error)
- type CompositeProfileKey
- type CompositeProfileManager
- type CompositeProfileMetadata
- type ControllerElement
- type DBService
- func (d DBService) CheckLogicalCloud(project, logicalCloud string) error
- func (d DBService) CheckProject(project string) error
- func (d DBService) DBFind(storeName string, key db.Key, meta string) ([][]byte, error)
- func (d DBService) DBInsert(storeName string, key db.Key, query interface{}, meta string, c interface{}) error
- func (d DBService) DBRemove(storeName string, key db.Key) error
- func (d DBService) DBUnmarshal(value []byte, out interface{}) error
- func (d DBService) GetAppContextStatus(ac appcontext.AppContext) (*appcontext.AppContextStatus, error)
- func (d DBService) GetLogicalCloudContext(storeName string, key db.Key, meta string, project string, name string) (appcontext.AppContext, string, error)
- func (d DBService) GetLogicalCloudFromContext(storeName string, appContextId string) (string, string, error)
- type DepMetaData
- type DepSpecData
- type DeploymentAppsListStatus
- type DeploymentClustersByAppStatus
- type DeploymentIntentGroup
- type DeploymentIntentGroupClient
- func (c *DeploymentIntentGroupClient) CreateDeploymentIntentGroup(d DeploymentIntentGroup, p string, ca string, v string) (DeploymentIntentGroup, error)
- func (c *DeploymentIntentGroupClient) DeleteDeploymentIntentGroup(di string, p string, ca string, v string) error
- func (c *DeploymentIntentGroupClient) GetAllDeploymentIntentGroups(p string, ca string, v string) ([]DeploymentIntentGroup, error)
- func (c *DeploymentIntentGroupClient) GetDeploymentIntentGroup(di string, p string, ca string, v string) (DeploymentIntentGroup, error)
- func (c *DeploymentIntentGroupClient) GetDeploymentIntentGroupState(di string, p string, ca string, v string) (state.StateInfo, error)
- type DeploymentIntentGroupKey
- type DeploymentIntentGroupManager
- type DeploymentResourcesByAppStatus
- type DeploymentStatus
- type GenIntentMetaData
- type GenericPlacementIntent
- type GenericPlacementIntentClient
- func (c *GenericPlacementIntentClient) CreateGenericPlacementIntent(g GenericPlacementIntent, p string, ca string, v string, digName string) (GenericPlacementIntent, error)
- func (c *GenericPlacementIntentClient) DeleteGenericPlacementIntent(i string, p string, ca string, v string, digName string) error
- func (c *GenericPlacementIntentClient) GetAllGenericPlacementIntents(p string, ca string, v string, digName string) ([]GenericPlacementIntent, error)
- func (c *GenericPlacementIntentClient) GetGenericPlacementIntent(i string, p string, ca string, v string, digName string) (GenericPlacementIntent, error)
- type GenericPlacementIntentKey
- type GenericPlacementIntentManager
- type InstantiationClient
- func (c InstantiationClient) Approve(p string, ca string, v string, di string) error
- func (c InstantiationClient) Instantiate(p string, ca string, v string, di string) error
- func (c InstantiationClient) Migrate(p string, ca string, v string, tCav string, di string, tDi string) error
- func (c InstantiationClient) Rollback(p string, ca string, v string, di string, rbRev string) error
- func (c InstantiationClient) Status(p, ca, v, di, qInstance, qType, qOutput string, ...) (DeploymentStatus, error)
- func (c InstantiationClient) StatusAppsList(p, ca, v, di, qInstance string) (DeploymentAppsListStatus, error)
- func (c InstantiationClient) StatusClustersByApp(p, ca, v, di, qInstance string, fApps []string) (DeploymentClustersByAppStatus, error)
- func (c InstantiationClient) StatusResourcesByApp(p, ca, v, di, qInstance, qType string, fApps, fClusters []string) (DeploymentResourcesByAppStatus, error)
- func (c InstantiationClient) Stop(p string, ca string, v string, di string) error
- func (c InstantiationClient) Terminate(p string, ca string, v string, di string) error
- func (c InstantiationClient) Update(p string, ca string, v string, di string) (int64, error)
- type InstantiationClientDbInfo
- type InstantiationKey
- type InstantiationManager
- type Instantiator
- type Intent
- type IntentClient
- func (c *IntentClient) AddIntent(a Intent, p string, ca string, v string, di string) (Intent, error)
- func (c IntentClient) DeleteIntent(i string, p string, ca string, v string, di string) error
- func (c IntentClient) GetAllIntents(p string, ca string, v string, di string) (ListOfIntents, error)
- func (c *IntentClient) GetIntent(i string, p string, ca string, v string, di string) (Intent, error)
- func (c IntentClient) GetIntentByName(i string, p string, ca string, v string, di string) (IntentSpecData, error)
- type IntentKey
- type IntentManager
- type IntentMetaData
- type IntentSpecData
- type K8sResource
- type KubeCluster
- type KubeClusterDef
- type KubeConfig
- type KubeContext
- type KubeContextDef
- type KubeUser
- type KubeUserDef
- type ListOfIntents
- type LogicalCloud
- type LogicalCloudClient
- func (v *LogicalCloudClient) Create(project string, c LogicalCloud) (LogicalCloud, error)
- func (v *LogicalCloudClient) Delete(project, logicalCloudName string) error
- func (v *LogicalCloudClient) Get(project, logicalCloudName string) (LogicalCloud, error)
- func (v *LogicalCloudClient) GetAll(project string) ([]LogicalCloud, error)
- func (v *LogicalCloudClient) Update(project, logicalCloudName string, c LogicalCloud) (LogicalCloud, error)
- type LogicalCloudKey
- type LogicalCloudManager
- type MetaData
- type MetaDataList
- type MetadataList
- type MigrateJson
- type MigrateSpec
- type OverrideValues
- type PrioritizedControlList
- type PriorityQueue
- type Project
- type ProjectClient
- type ProjectKey
- type ProjectManager
- type ProjectMetaData
- type RollbackJson
- type RollbackSpec
- type Spec
- type SpecData
- type UpdateMetadata
- type UserData
- type UserPerm
- type Utility
Constants ¶
const ControllerTypeAction string = "action"
ControllerTypeAction denotes "action" Controller Type
const ControllerTypePlacement string = "placement"
ControllerTypePlacement denotes "placement" Controller Type
const GenericPlacementIntentName = "genericPlacementIntent"
GenericPlacementIntentName denotes the generic placement intent name
const ManifestFileName = "manifest.yaml"
ManifestFileName is the name given to the manifest file in the profile package
const SEPARATOR = "+"
SEPARATOR used while creating clusternames to store in etcd
Variables ¶
This section is empty.
Functions ¶
func GetSortedTemplateForApp ¶
func GetSortedTemplateForApp(appName, p, ca, v, rName, cp, namespace string, overrideValues []OverrideValues) ([]helm.KubernetesResourceTemplate, error)
GetSortedTemplateForApp returns the sorted templates. It takes in arguments - appName, project, compositeAppName, releaseName, compositeProfileName, array of override values
Types ¶
type App ¶
type App struct {
Metadata AppMetaData `json:"metadata"`
}
App contains metadata for Apps
type AppClient ¶
type AppClient struct {
// contains filtered or unexported fields
}
AppClient implements the AppManager It will also be used to maintain some localized state
func NewAppClient ¶
func NewAppClient() *AppClient
NewAppClient returns an instance of the AppClient which implements the AppManager
func (*AppClient) CreateApp ¶
func (v *AppClient) CreateApp(a App, ac AppContent, p string, cN string, cV string, exists bool) (App, error)
CreateApp creates a new collection based on the App
func (*AppClient) GetAppContent ¶
GetAppContent returns content for corresponding app
type AppClusterInfo ¶
type AppClusterInfo struct { Name string `json:"name"` AllOfArray []gpic.AllOf `json:"allOf,omitempty"` AnyOfArray []gpic.AnyOf `json:"anyOf,omitempty"` }
AppClusterInfo is a type linking the app and the clusters on which they need to be installed.
type AppContextKey ¶
type AppContextKey struct {
LCContext string `json:"lccontext"`
}
AppContextKey is an alternative key to access logical clouds
type AppIntent ¶
type AppIntent struct { MetaData MetaData `json:"metadata,omitempty"` Spec SpecData `json:"spec,omitempty"` }
AppIntent has two components - metadata, spec
type AppIntentClient ¶
type AppIntentClient struct {
// contains filtered or unexported fields
}
AppIntentClient implements the AppIntentManager interface
func NewAppIntentClient ¶
func NewAppIntentClient() *AppIntentClient
NewAppIntentClient returns an instance of AppIntentClient
func (*AppIntentClient) CreateAppIntent ¶
func (c *AppIntentClient) CreateAppIntent(a AppIntent, p string, ca string, v string, i string, digName string) (AppIntent, error)
CreateAppIntent creates an entry for AppIntent in the db. Other input parameters for it - projectName, compositeAppName, version, intentName and deploymentIntentGroupName.
func (*AppIntentClient) DeleteAppIntent ¶
func (c *AppIntentClient) DeleteAppIntent(ai string, p string, ca string, v string, i string, digName string) error
DeleteAppIntent delete an AppIntent
func (*AppIntentClient) GetAllAppIntents ¶
func (c *AppIntentClient) GetAllAppIntents(p, ca, v, i, digName string) ([]AppIntent, error)
GetAllAppIntents takes in paramaters ProjectName, CompositeAppName, CompositeNameVersion and GenericPlacementIntentName,DeploymentIntentGroupName. Returns an array of AppIntents
func (*AppIntentClient) GetAllIntentsByApp ¶
func (c *AppIntentClient) GetAllIntentsByApp(aN, p, ca, v, i, digName string) (SpecData, error)
GetAllIntentsByApp queries intent by AppName, it takes in parameters AppName, CompositeAppName, CompositeNameVersion, GenericPlacementIntentName & DeploymentIntentGroupName. Returns SpecData which contains all the intents for the app.
func (*AppIntentClient) GetAppIntent ¶
func (c *AppIntentClient) GetAppIntent(ai string, p string, ca string, v string, i string, digName string) (AppIntent, error)
GetAppIntent shall take arguments - name of the app intent, name of the project, name of the composite app, version of the composite app,intent name and deploymentIntentGroupName. It shall return the AppIntent
type AppIntentFindByAppKey ¶
type AppIntentFindByAppKey struct { Project string `json:"project"` CompositeApp string `json:"compositeapp"` CompositeAppVersion string `json:"compositeappversion"` Intent string `json:"genericplacement"` DeploymentIntentGroupName string `json:"deploymentintentgroup"` AppName string `json:"app-name"` }
AppIntentFindByAppKey required for query
type AppIntentKey ¶
type AppIntentKey struct { Name string `json:"appintent"` Project string `json:"project"` CompositeApp string `json:"compositeapp"` Version string `json:"compositeappversion"` Intent string `json:"genericplacement"` DeploymentIntentGroupName string `json:"deploymentintentgroup"` }
AppIntentKey is used as primary key
func (AppIntentKey) String ¶
func (ak AppIntentKey) String() string
We will use json marshalling to convert to string to preserve the underlying structure.
type AppIntentManager ¶
type AppIntentManager interface { CreateAppIntent(a AppIntent, p string, ca string, v string, i string, digName string) (AppIntent, error) GetAppIntent(ai string, p string, ca string, v string, i string, digName string) (AppIntent, error) GetAllIntentsByApp(aN, p, ca, v, i, digName string) (SpecData, error) GetAllAppIntents(p, ca, v, i, digName string) ([]AppIntent, error) DeleteAppIntent(ai string, p string, ca string, v string, i string, digName string) error }
AppIntentManager is an interface which exposes the AppIntentManager functionalities
type AppIntentQueryKey ¶
type AppIntentQueryKey struct {
AppName string `json:"app-name"`
}
AppIntentQueryKey required for query
type AppKey ¶
type AppKey struct { App string `json:"app"` Project string `json:"project"` CompositeApp string `json:"compositeapp"` CompositeAppVersion string `json:"compositeappversion"` }
AppKey is the key structure that is used in the database
type AppManager ¶
type AppManager interface { CreateApp(a App, ac AppContent, p string, cN string, cV string, exists bool) (App, error) GetApp(name string, p string, cN string, cV string) (App, error) GetAppContent(name string, p string, cN string, cV string) (AppContent, error) GetApps(p string, cN string, cV string) ([]App, error) DeleteApp(name string, p string, cN string, cV string) error }
AppManager is an interface exposes the App functionality
type AppMetaData ¶
type AppMetaData struct { Name string `json:"name"` Description string `json:"description"` UserData1 string `json:"userData1"` UserData2 string `json:"userData2"` }
AppMetaData contains the parameters needed for Apps
type AppProfile ¶
type AppProfile struct { Metadata AppProfileMetadata `json:"metadata"` Spec AppProfileSpec `json:"spec"` }
AppProfile contains the parameters needed for AppProfiles It implements the interface for managing the AppProfiles
type AppProfileClient ¶
type AppProfileClient struct {
// contains filtered or unexported fields
}
AppProfileClient implements the Manager It will also be used to maintain some localized state
func NewAppProfileClient ¶
func NewAppProfileClient() *AppProfileClient
NewAppProfileClient returns an instance of the AppProfileClient which implements the Manager
func (*AppProfileClient) CreateAppProfile ¶
func (c *AppProfileClient) CreateAppProfile(project, compositeApp, compositeAppVersion, compositeProfile string, ap AppProfile, ac AppProfileContent, exists bool) (AppProfile, error)
CreateAppProfile creates an entry for AppProfile in the database.
func (*AppProfileClient) DeleteAppProfile ¶
func (c *AppProfileClient) DeleteAppProfile(project, compositeApp, compositeAppVersion, compositeProfile, profile string) error
Delete AppProfile from the database
func (*AppProfileClient) GetAppProfile ¶
func (c *AppProfileClient) GetAppProfile(project, compositeApp, compositeAppVersion, compositeProfile, profile string) (AppProfile, error)
GetAppProfile - return specified App Profile
func (*AppProfileClient) GetAppProfileByApp ¶
func (c *AppProfileClient) GetAppProfileByApp(project, compositeApp, compositeAppVersion, compositeProfile, appName string) (AppProfile, error)
GetAppProfileByApp - return all App Profiles for given composite profile
func (*AppProfileClient) GetAppProfileContent ¶
func (c *AppProfileClient) GetAppProfileContent(project, compositeApp, compositeAppVersion, compositeProfile, profile string) (AppProfileContent, error)
func (*AppProfileClient) GetAppProfileContentByApp ¶
func (c *AppProfileClient) GetAppProfileContentByApp(project, compositeApp, compositeAppVersion, compositeProfile, appName string) (AppProfileContent, error)
func (*AppProfileClient) GetAppProfiles ¶
func (c *AppProfileClient) GetAppProfiles(project, compositeApp, compositeAppVersion, compositeProfile string) ([]AppProfile, error)
GetAppProfile - return all App Profiles for given composite profile
type AppProfileContent ¶
type AppProfileContent struct {
Profile string `json:"profile"`
}
type AppProfileFindByAppKey ¶
type AppProfileKey ¶
type AppProfileKey struct { Project string `json:"project"` CompositeApp string `json:"compositeapp"` CompositeAppVersion string `json:"compositeappversion"` CompositeProfile string `json:"compositeprofile"` Profile string `json:"profile"` }
AppProfileKey is the key structure that is used in the database
type AppProfileManager ¶
type AppProfileManager interface { CreateAppProfile(provider, compositeApp, compositeAppVersion, compositeProfile string, ap AppProfile, ac AppProfileContent, exists bool) (AppProfile, error) GetAppProfile(project, compositeApp, compositeAppVersion, compositeProfile, profile string) (AppProfile, error) GetAppProfiles(project, compositeApp, compositeAppVersion, compositeProfile string) ([]AppProfile, error) GetAppProfileByApp(project, compositeApp, compositeAppVersion, compositeProfile, appName string) (AppProfile, error) GetAppProfileContent(project, compositeApp, compositeAppVersion, compositeProfile, profile string) (AppProfileContent, error) GetAppProfileContentByApp(project, compositeApp, compositeAppVersion, compositeProfile, appName string) (AppProfileContent, error) DeleteAppProfile(project, compositeApp, compositeAppVersion, compositeProfile, profile string) error }
AppProfileManager exposes the AppProfile functionality
type AppProfileMetadata ¶
type AppProfileMetadata struct { Name string `json:"name"` Description string `json:"description"` UserData1 string `json:"userData1"` UserData2 string `json:"userData2"` }
AppProfileMetadata contains the metadata for AppProfiles
type AppProfileQueryKey ¶
type AppProfileQueryKey struct {
AppName string `json:"app-name"`
}
type AppProfileSpec ¶
type AppProfileSpec struct {
AppName string `json:"app-name"`
}
AppProfileSpec contains the Spec for AppProfiles
type ApplicationsAndClusterInfo ¶
type ApplicationsAndClusterInfo struct {
ArrayOfAppClusterInfo []AppClusterInfo `json:"applications"`
}
ApplicationsAndClusterInfo type represents the list of
type Client ¶
type Client struct { Project *ProjectClient CompositeApp *CompositeAppClient App *AppClient Controller *controller.ControllerClient GenericPlacementIntent *GenericPlacementIntentClient AppIntent *AppIntentClient DeploymentIntentGroup *DeploymentIntentGroupClient Intent *IntentClient CompositeProfile *CompositeProfileClient AppProfile *AppProfileClient // Add Clients for API's here Instantiation *InstantiationClient }
Client for using the services in the orchestrator
type Cluster ¶
type Cluster struct { MetaData ClusterMeta `json:"metadata"` Specification ClusterSpec `json:"spec"` }
Cluster contains the parameters needed for a Cluster
type ClusterClient ¶
type ClusterClient struct {
// contains filtered or unexported fields
}
ClusterClient implements the ClusterManager It will also be used to maintain some localized state
func NewClusterClient ¶
func NewClusterClient() *ClusterClient
ClusterClient returns an instance of the ClusterClient which implements the ClusterManager
func (*ClusterClient) CreateCluster ¶
func (v *ClusterClient) CreateCluster(project, logicalCloud string, c Cluster) (Cluster, error)
Create entry for the cluster reference resource in the database
func (*ClusterClient) DeleteCluster ¶
func (v *ClusterClient) DeleteCluster(project, logicalCloud, clusterReference string) error
Delete the Cluster reference entry from database
func (*ClusterClient) GetAllClusters ¶
func (v *ClusterClient) GetAllClusters(project, logicalCloud string) ([]Cluster, error)
GetAll returns all cluster references in the logical cloud
func (*ClusterClient) GetCluster ¶
func (v *ClusterClient) GetCluster(project, logicalCloud, clusterReference string) (Cluster, error)
Get returns Cluster for corresponding cluster reference
func (*ClusterClient) GetClusterConfig ¶
func (v *ClusterClient) GetClusterConfig(project, logicalCloud, clusterReference string) (string, error)
Get returns Cluster's kubeconfig for corresponding cluster reference
func (*ClusterClient) UpdateCluster ¶
func (v *ClusterClient) UpdateCluster(project, logicalCloud, clusterReference string, c Cluster) (Cluster, error)
Update an entry for the Cluster reference in the database
type ClusterKey ¶
type ClusterManager ¶
type ClusterManager interface { CreateCluster(project, logicalCloud string, c Cluster) (Cluster, error) GetCluster(project, logicalCloud, name string) (Cluster, error) GetAllClusters(project, logicalCloud string) ([]Cluster, error) DeleteCluster(project, logicalCloud, name string) error UpdateCluster(project, logicalCloud, name string, c Cluster) (Cluster, error) GetClusterConfig(project, logicalcloud, name string) (string, error) }
ClusterManager is an interface that exposes the connection functionality
type ClusterMeta ¶
type ClusterSpec ¶
type CompositeApp ¶
type CompositeApp struct { Metadata CompositeAppMetaData `json:"metadata"` Spec CompositeAppSpec `json:"spec"` }
CompositeApp contains metadata and spec for CompositeApps
type CompositeAppClient ¶
type CompositeAppClient struct {
// contains filtered or unexported fields
}
CompositeAppClient implements the CompositeAppManager It will also be used to maintain some localized state
func NewCompositeAppClient ¶
func NewCompositeAppClient() *CompositeAppClient
NewCompositeAppClient returns an instance of the CompositeAppClient which implements the CompositeAppManager
func (*CompositeAppClient) CreateCompositeApp ¶
func (v *CompositeAppClient) CreateCompositeApp(c CompositeApp, p string, exists bool) (CompositeApp, error)
CreateCompositeApp creates a new collection based on the CompositeApp
func (*CompositeAppClient) DeleteCompositeApp ¶
func (v *CompositeAppClient) DeleteCompositeApp(name string, version string, p string) error
DeleteCompositeApp deletes the CompositeApp from database
func (*CompositeAppClient) GetAllCompositeApps ¶
func (v *CompositeAppClient) GetAllCompositeApps(p string) ([]CompositeApp, error)
GetAllCompositeApps returns all the compositeApp for a given project
func (*CompositeAppClient) GetCompositeApp ¶
func (v *CompositeAppClient) GetCompositeApp(name string, version string, p string) (CompositeApp, error)
GetCompositeApp returns the CompositeApp for corresponding name
type CompositeAppKey ¶
type CompositeAppKey struct { CompositeAppName string `json:"compositeapp"` Version string `json:"compositeappversion"` Project string `json:"project"` }
CompositeAppKey is the key structure that is used in the database
func (CompositeAppKey) String ¶
func (cK CompositeAppKey) String() string
We will use json marshalling to convert to string to preserve the underlying structure.
type CompositeAppManager ¶
type CompositeAppManager interface { CreateCompositeApp(c CompositeApp, p string, exists bool) (CompositeApp, error) GetCompositeApp(name string, version string, p string) (CompositeApp, error) GetAllCompositeApps(p string) ([]CompositeApp, error) DeleteCompositeApp(name string, version string, p string) error }
CompositeAppManager is an interface exposes the CompositeApp functionality
type CompositeAppMetaData ¶
type CompositeAppMetaData struct { Name string `json:"name"` Description string `json:"description"` UserData1 string `json:"userData1"` UserData2 string `json:"userData2"` }
CompositeAppMetaData contains the parameters needed for CompositeApps
type CompositeAppSpec ¶
type CompositeAppSpec struct {
Version string `json:"version"`
}
CompositeAppSpec contains the Version of the CompositeApp
type CompositeProfile ¶
type CompositeProfile struct {
Metadata CompositeProfileMetadata `json:"metadata"`
}
CompositeProfile contains the parameters needed for CompositeProfiles It implements the interface for managing the CompositeProfiles
type CompositeProfileClient ¶
type CompositeProfileClient struct {
// contains filtered or unexported fields
}
CompositeProfileClient implements the Manager It will also be used to maintain some localized state
func NewCompositeProfileClient ¶
func NewCompositeProfileClient() *CompositeProfileClient
NewCompositeProfileClient returns an instance of the CompositeProfileClient which implements the Manager
func (*CompositeProfileClient) CreateCompositeProfile ¶
func (c *CompositeProfileClient) CreateCompositeProfile(cpf CompositeProfile, p string, ca string, v string, exists bool) (CompositeProfile, error)
CreateCompositeProfile creates an entry for CompositeProfile in the database. Other Input parameters for it - projectName, compositeAppName, version
func (*CompositeProfileClient) DeleteCompositeProfile ¶
func (c *CompositeProfileClient) DeleteCompositeProfile(cpf string, p string, ca string, v string) error
DeleteCompositeProfile deletes the compsiteApp profile from the database
func (*CompositeProfileClient) GetCompositeProfile ¶
func (c *CompositeProfileClient) GetCompositeProfile(cpf string, p string, ca string, v string) (CompositeProfile, error)
GetCompositeProfile shall take arguments - name of the composite profile, name of the project, name of the composite app and version of the composite app. It shall return the CompositeProfile if its present.
func (*CompositeProfileClient) GetCompositeProfiles ¶
func (c *CompositeProfileClient) GetCompositeProfiles(p string, ca string, v string) ([]CompositeProfile, error)
GetCompositeProfiles shall take arguments - name of the project, name of the composite profile and version of the composite app. It shall return an array of CompositeProfile.
type CompositeProfileKey ¶
type CompositeProfileKey struct { Name string `json:"compositeprofile"` Project string `json:"project"` CompositeApp string `json:"compositeapp"` Version string `json:"compositeappversion"` }
CompositeProfileKey is the key structure that is used in the database
func (CompositeProfileKey) String ¶
func (cpk CompositeProfileKey) String() string
We will use json marshalling to convert to string to preserve the underlying structure.
type CompositeProfileManager ¶
type CompositeProfileManager interface { CreateCompositeProfile(cpf CompositeProfile, p string, ca string, v string, exists bool) (CompositeProfile, error) GetCompositeProfile(compositeProfileName string, projectName string, compositeAppName string, version string) (CompositeProfile, error) GetCompositeProfiles(projectName string, compositeAppName string, version string) ([]CompositeProfile, error) DeleteCompositeProfile(compositeProfileName string, projectName string, compositeAppName string, version string) error }
CompositeProfileManager exposes the CompositeProfile functionality
type CompositeProfileMetadata ¶
type CompositeProfileMetadata struct { Name string `json:"name"` Description string `json:"description"` UserData1 string `json:"userData1"` UserData2 string `json:"userData2"` }
CompositeProfileMetadata contains the metadata for CompositeProfiles
type ControllerElement ¶
type ControllerElement struct {
// contains filtered or unexported fields
}
ControllerElement consists of controller and an internal field - index
type DBService ¶
type DBService struct{}
Added for unit testing; implements Utility interface
func (DBService) CheckLogicalCloud ¶
func (DBService) CheckProject ¶
func (DBService) DBUnmarshal ¶
func (DBService) GetAppContextStatus ¶
func (d DBService) GetAppContextStatus(ac appcontext.AppContext) (*appcontext.AppContextStatus, error)
func (DBService) GetLogicalCloudContext ¶
func (d DBService) GetLogicalCloudContext(storeName string, key db.Key, meta string, project string, name string) (appcontext.AppContext, string, error)
GetLogicalCloudContext returns the AppContext for corresponding provider and name
type DepMetaData ¶
type DepMetaData struct { Name string `json:"name"` Description string `json:"description"` UserData1 string `json:"userData1"` UserData2 string `json:"userData2"` }
DepMetaData has Name, description, userdata1, userdata2
type DepSpecData ¶
type DepSpecData struct { Profile string `json:"profile"` Version string `json:"version"` OverrideValuesObj []OverrideValues `json:"override-values"` LogicalCloud string `json:"logical-cloud"` }
DepSpecData has profile, version, OverrideValuesObj
type DeploymentAppsListStatus ¶
type DeploymentAppsListStatus struct { Project string `json:"project,omitempty"` CompositeAppName string `json:"composite-app-name,omitempty"` CompositeAppVersion string `json:"composite-app-version,omitempty"` CompositeProfileName string `json:"composite-profile-name,omitempty"` status.AppsListResult `json:",inline"` }
DeploymentAppsListStatus is the structure used to return the list of Apps that have been/were deployed for the DeploymentIntentGroup
type DeploymentClustersByAppStatus ¶
type DeploymentClustersByAppStatus struct { Project string `json:"project,omitempty"` CompositeAppName string `json:"composite-app-name,omitempty"` CompositeAppVersion string `json:"composite-app-version,omitempty"` CompositeProfileName string `json:"composite-profile-name,omitempty"` status.ClustersByAppResult `json:",inline"` }
DeploymentClustersByAppStatus is the structure used to return the list of Apps that have been/were deployed for the DeploymentIntentGroup
type DeploymentIntentGroup ¶
type DeploymentIntentGroup struct { MetaData DepMetaData `json:"metadata"` Spec DepSpecData `json:"spec"` }
DeploymentIntentGroup shall have 2 fields - MetaData and Spec
type DeploymentIntentGroupClient ¶
type DeploymentIntentGroupClient struct {
// contains filtered or unexported fields
}
DeploymentIntentGroupClient implements the DeploymentIntentGroupManager interface
func NewDeploymentIntentGroupClient ¶
func NewDeploymentIntentGroupClient() *DeploymentIntentGroupClient
NewDeploymentIntentGroupClient return an instance of DeploymentIntentGroupClient which implements DeploymentIntentGroupManager
func (*DeploymentIntentGroupClient) CreateDeploymentIntentGroup ¶
func (c *DeploymentIntentGroupClient) CreateDeploymentIntentGroup(d DeploymentIntentGroup, p string, ca string, v string) (DeploymentIntentGroup, error)
CreateDeploymentIntentGroup creates an entry for a given DeploymentIntentGroup in the database. Other Input parameters for it - projectName, compositeAppName, version
func (*DeploymentIntentGroupClient) DeleteDeploymentIntentGroup ¶
func (c *DeploymentIntentGroupClient) DeleteDeploymentIntentGroup(di string, p string, ca string, v string) error
DeleteDeploymentIntentGroup deletes a DeploymentIntentGroup
func (*DeploymentIntentGroupClient) GetAllDeploymentIntentGroups ¶
func (c *DeploymentIntentGroupClient) GetAllDeploymentIntentGroups(p string, ca string, v string) ([]DeploymentIntentGroup, error)
GetAllDeploymentIntentGroups returns all the deploymentIntentGroups under a specific project, compositeApp and version
func (*DeploymentIntentGroupClient) GetDeploymentIntentGroup ¶
func (c *DeploymentIntentGroupClient) GetDeploymentIntentGroup(di string, p string, ca string, v string) (DeploymentIntentGroup, error)
GetDeploymentIntentGroup returns the DeploymentIntentGroup with a given name, project, compositeApp and version of compositeApp
func (*DeploymentIntentGroupClient) GetDeploymentIntentGroupState ¶
func (c *DeploymentIntentGroupClient) GetDeploymentIntentGroupState(di string, p string, ca string, v string) (state.StateInfo, error)
GetDeploymentIntentGroupState returns the DIG-StateInfo with a given DeploymentIntentname, project, compositeAppName and version of compositeApp
type DeploymentIntentGroupKey ¶
type DeploymentIntentGroupKey struct { Name string `json:"deploymentintentgroup"` Project string `json:"project"` CompositeApp string `json:"compositeapp"` Version string `json:"compositeappversion"` }
DeploymentIntentGroupKey consists of Name of the deployment group, project name, CompositeApp name, CompositeApp version
func (DeploymentIntentGroupKey) String ¶
func (dk DeploymentIntentGroupKey) String() string
We will use json marshalling to convert to string to preserve the underlying structure.
type DeploymentIntentGroupManager ¶
type DeploymentIntentGroupManager interface { CreateDeploymentIntentGroup(d DeploymentIntentGroup, p string, ca string, v string) (DeploymentIntentGroup, error) GetDeploymentIntentGroup(di string, p string, ca string, v string) (DeploymentIntentGroup, error) GetDeploymentIntentGroupState(di string, p string, ca string, v string) (state.StateInfo, error) DeleteDeploymentIntentGroup(di string, p string, ca string, v string) error GetAllDeploymentIntentGroups(p string, ca string, v string) ([]DeploymentIntentGroup, error) }
DeploymentIntentGroupManager is an interface which exposes the DeploymentIntentGroupManager functionality
type DeploymentResourcesByAppStatus ¶
type DeploymentResourcesByAppStatus struct { Project string `json:"project,omitempty"` CompositeAppName string `json:"composite-app-name,omitempty"` CompositeAppVersion string `json:"composite-app-version,omitempty"` CompositeProfileName string `json:"composite-profile-name,omitempty"` status.ResourcesByAppResult `json:",inline"` }
DeploymentResourcesByAppStatus is the structure used to return the list of Apps that have been/were deployed for the DeploymentIntentGroup
type DeploymentStatus ¶
type DeploymentStatus struct { Project string `json:"project,omitempty"` CompositeAppName string `json:"composite-app-name,omitempty"` CompositeAppVersion string `json:"composite-app-version,omitempty"` CompositeProfileName string `json:"composite-profile-name,omitempty"` status.StatusResult `json:",inline"` }
DeploymentStatus is the structure used to return general status results for the Deployment Intent Group
type GenIntentMetaData ¶
type GenIntentMetaData struct { Name string `json:"name"` Description string `json:"description"` UserData1 string `json:"userData1"` UserData2 string `json:"userData2"` }
GenIntentMetaData has name, description, userdata1, userdata2
type GenericPlacementIntent ¶
type GenericPlacementIntent struct {
MetaData GenIntentMetaData `json:"metadata"`
}
GenericPlacementIntent shall have 2 fields - metadata and spec
type GenericPlacementIntentClient ¶
type GenericPlacementIntentClient struct {
// contains filtered or unexported fields
}
GenericPlacementIntentClient implements the GenericPlacementIntentManager interface
func NewGenericPlacementIntentClient ¶
func NewGenericPlacementIntentClient() *GenericPlacementIntentClient
NewGenericPlacementIntentClient return an instance of GenericPlacementIntentClient which implements GenericPlacementIntentManager
func (*GenericPlacementIntentClient) CreateGenericPlacementIntent ¶
func (c *GenericPlacementIntentClient) CreateGenericPlacementIntent(g GenericPlacementIntent, p string, ca string, v string, digName string) (GenericPlacementIntent, error)
CreateGenericPlacementIntent creates an entry for GenericPlacementIntent in the database. Other Input parameters for it - projectName, compositeAppName, version and deploymentIntentGroupName
func (*GenericPlacementIntentClient) DeleteGenericPlacementIntent ¶
func (c *GenericPlacementIntentClient) DeleteGenericPlacementIntent(i string, p string, ca string, v string, digName string) error
DeleteGenericPlacementIntent the intent from the database
func (*GenericPlacementIntentClient) GetAllGenericPlacementIntents ¶
func (c *GenericPlacementIntentClient) GetAllGenericPlacementIntents(p string, ca string, v string, digName string) ([]GenericPlacementIntent, error)
GetAllGenericPlacementIntents returns all the generic placement intents for a given compsoite app name, composite app version, project and deploymentIntentGroupName
func (*GenericPlacementIntentClient) GetGenericPlacementIntent ¶
func (c *GenericPlacementIntentClient) GetGenericPlacementIntent(i string, p string, ca string, v string, digName string) (GenericPlacementIntent, error)
GetGenericPlacementIntent shall take arguments - name of the intent, name of the project, name of the composite app, version of the composite app and deploymentIntentGroupName. It shall return the genericPlacementIntent if its present.
type GenericPlacementIntentKey ¶
type GenericPlacementIntentKey struct { Name string `json:"genericplacement"` Project string `json:"project"` CompositeApp string `json:"compositeapp"` Version string `json:"compositeappversion"` DigName string `json:"deploymentintentgroup"` }
GenericPlacementIntentKey is used as the primary key
func (GenericPlacementIntentKey) String ¶
func (gk GenericPlacementIntentKey) String() string
We will use json marshalling to convert to string to preserve the underlying structure.
type GenericPlacementIntentManager ¶
type GenericPlacementIntentManager interface { CreateGenericPlacementIntent(g GenericPlacementIntent, p string, ca string, v string, digName string) (GenericPlacementIntent, error) GetGenericPlacementIntent(intentName string, projectName string, compositeAppName string, version string, digName string) (GenericPlacementIntent, error) DeleteGenericPlacementIntent(intentName string, projectName string, compositeAppName string, version string, digName string) error GetAllGenericPlacementIntents(p string, ca string, v string, digName string) ([]GenericPlacementIntent, error) }
GenericPlacementIntentManager is an interface which exposes the GenericPlacementIntentManager functionality
type InstantiationClient ¶
type InstantiationClient struct {
// contains filtered or unexported fields
}
InstantiationClient implements the InstantiationManager
func NewInstantiationClient ¶
func NewInstantiationClient() *InstantiationClient
NewInstantiationClient returns an instance of InstantiationClient
func (InstantiationClient) Instantiate ¶
Instantiate methods takes in projectName, compositeAppName, compositeAppVersion, DeploymentIntentName. This method is responsible for template resolution, intent resolution, creation and saving of context for saving into etcd.
func (InstantiationClient) Migrate ¶
func (c InstantiationClient) Migrate(p string, ca string, v string, tCav string, di string, tDi string) error
Migrate methods takes in projectName, compositeAppName, compositeAppVersion, DeploymentIntentName, targetCompositeAppVersion and targetDeploymentIntentName. This method is responsible for creation and saving of context for saving into etcd and ensuring sourceDeploymentIntent gets migrated to targetDeploymentIntent.
func (InstantiationClient) Rollback ¶
Rollback methods takes in projectName, compositeAppName, compositeAppVersion, DeploymentIntentName and revision. This method is responsible for creation and saving of context for saving into etcd and ensuring DeploymentIntentGroup is rollback to given revision.
func (InstantiationClient) Status ¶
func (c InstantiationClient) Status(p, ca, v, di, qInstance, qType, qOutput string, fApps, fClusters, fResources []string) (DeploymentStatus, error)
Status takes in projectName, compositeAppName, compositeAppVersion, DeploymentIntentName. This method is responsible obtaining the status of the deployment, which is made available in the appcontext.
func (InstantiationClient) StatusAppsList ¶
func (c InstantiationClient) StatusAppsList(p, ca, v, di, qInstance string) (DeploymentAppsListStatus, error)
StatusAppsList takes in projectName, compositeAppName, compositeAppVersion, DeploymentIntentName. This method returns the list of apps in use for the given instance of appcontext of this deployment intent group.
func (InstantiationClient) StatusClustersByApp ¶
func (c InstantiationClient) StatusClustersByApp(p, ca, v, di, qInstance string, fApps []string) (DeploymentClustersByAppStatus, error)
StatusClustersByApp takes in projectName, compositeAppName, compositeAppVersion, DeploymentIntentName. This method returns the list of apps in use for the given instance of appcontext of this deployment intent group.
func (InstantiationClient) StatusResourcesByApp ¶
func (c InstantiationClient) StatusResourcesByApp(p, ca, v, di, qInstance, qType string, fApps, fClusters []string) (DeploymentResourcesByAppStatus, error)
StatusResourcesByApp takes in projectName, compositeAppName, compositeAppVersion, DeploymentIntentName. This method returns the list of apps in use for the given instance of appcontext of this deployment intent group.
func (InstantiationClient) Stop ¶
Stop takes in projectName, compositeAppName, compositeAppVersion, DeploymentIntentName and sets the stopFlag in the associated appContext.
func (InstantiationClient) Terminate ¶
Terminate takes in projectName, compositeAppName, compositeAppVersion, DeploymentIntentName and calls rsync to terminate.
type InstantiationClientDbInfo ¶
type InstantiationClientDbInfo struct {
// contains filtered or unexported fields
}
InstantiationClientDbInfo consists of storeName and tagState
type InstantiationKey ¶
type InstantiationKey struct { Project string CompositeApp string Version string DeploymentIntentGroup string }
InstantiationKey used in storing the contextid in the momgodb It consists of ProjectName, CompositeAppName, CompositeAppVersion, DeploymentIntentGroup
type InstantiationManager ¶
type InstantiationManager interface { Approve(p string, ca string, v string, di string) error Instantiate(p string, ca string, v string, di string) error Status(p, ca, v, di, qInstance, qType, qOutput string, fApps, fClusters, fResources []string) (DeploymentStatus, error) StatusAppsList(p, ca, v, di, qInstance string) (DeploymentAppsListStatus, error) StatusClustersByApp(p, ca, v, di, qInstance string, fApps []string) (DeploymentClustersByAppStatus, error) StatusResourcesByApp(p, ca, v, di, qInstance, qType string, fApps, fClusters []string) (DeploymentResourcesByAppStatus, error) Terminate(p string, ca string, v string, di string) error Stop(p string, ca string, v string, di string) error Migrate(p string, ca string, v string, tCav string, di string, tDi string) error Update(p string, ca string, v string, di string) (int64, error) Rollback(p string, ca string, v string, di string, rbRev string) error }
InstantiationManager is an interface which exposes the InstantiationManager functionalities
type Instantiator ¶
type Instantiator struct {
// contains filtered or unexported fields
}
func (*Instantiator) MakeAppContext ¶
func (i *Instantiator) MakeAppContext() (contextForCompositeApp, error)
MakeAppContext shall make an app context and store the app context into etcd. This shall return contextForCompositeApp
type Intent ¶
type Intent struct { MetaData IntentMetaData `json:"metadata"` Spec IntentSpecData `json:"spec"` }
Intent shall have 2 fields - MetaData and Spec
type IntentClient ¶
type IntentClient struct {
// contains filtered or unexported fields
}
IntentClient implements the AddIntentManager interface
func NewIntentClient ¶
func NewIntentClient() *IntentClient
NewIntentClient returns an instance of AddIntentClient
func (*IntentClient) AddIntent ¶
func (c *IntentClient) AddIntent(a Intent, p string, ca string, v string, di string) (Intent, error)
AddIntent adds a given intent to the deployment-intent-group and stores in the db. Other input parameters for it - projectName, compositeAppName, version, DeploymentIntentgroupName
func (IntentClient) DeleteIntent ¶
DeleteIntent deletes a given intent tied to project, composite app and deployment intent group
func (IntentClient) GetAllIntents ¶
func (c IntentClient) GetAllIntents(p string, ca string, v string, di string) (ListOfIntents, error)
GetAllIntents takes in projectName, CompositeAppName, CompositeAppVersion, DeploymentIntentName . It returns ListOfIntents.
func (*IntentClient) GetIntent ¶
func (c *IntentClient) GetIntent(i string, p string, ca string, v string, di string) (Intent, error)
GetIntent takes in an IntentName, ProjectName, CompositeAppName, Version and DeploymentIntentGroup. It returns the Intent.
func (IntentClient) GetIntentByName ¶
func (c IntentClient) GetIntentByName(i string, p string, ca string, v string, di string) (IntentSpecData, error)
GetIntentByName takes in IntentName, projectName, CompositeAppName, CompositeAppVersion and deploymentIntentGroupName returns the list of intents under the IntentName.
type IntentKey ¶
type IntentKey struct { Name string `json:"intentname"` Project string `json:"project"` CompositeApp string `json:"compositeapp"` Version string `json:"compositeappversion"` DeploymentIntentGroup string `json:"deploymentintentgroup"` }
IntentKey consists of Name if the intent, Project name, CompositeApp name, CompositeApp version
type IntentManager ¶
type IntentManager interface { AddIntent(a Intent, p string, ca string, v string, di string) (Intent, error) GetIntent(i string, p string, ca string, v string, di string) (Intent, error) GetAllIntents(p, ca, v, di string) (ListOfIntents, error) GetIntentByName(i, p, ca, v, di string) (IntentSpecData, error) DeleteIntent(i string, p string, ca string, v string, di string) error }
IntentManager is an interface which exposes the IntentManager functionality
type IntentMetaData ¶
type IntentMetaData struct { Name string `json:"name"` Description string `json:"description"` UserData1 string `json:"userData1"` UserData2 string `json:"userData2"` }
IntentMetaData has Name, Description, userdata1, userdata2
type IntentSpecData ¶
IntentSpecData has Intent
type K8sResource ¶
type K8sResource struct {
Metadata MetadataList `yaml:"metadata"`
}
TODO move into a better place or reuse existing struct
type KubeCluster ¶
type KubeCluster struct { ClusterDef KubeClusterDef `yaml:"cluster"` ClusterName string `yaml:"name"` }
type KubeClusterDef ¶
type KubeConfig ¶
type KubeConfig struct { ApiVersion string `yaml:"apiVersion"` Kind string `yaml:"kind"` Clusters []KubeCluster `yaml:"clusters"` Contexts []KubeContext `yaml:"contexts"` CurrentContext string `yaml:"current-context"` Preferences map[string]string `yaml:"preferences"` Users []KubeUser `yaml:"users"` }
type KubeContext ¶
type KubeContext struct { ContextDef KubeContextDef `yaml:"context"` ContextName string `yaml:"name"` }
type KubeContextDef ¶
type KubeUser ¶
type KubeUser struct { UserName string `yaml:"name"` UserDef KubeUserDef `yaml:"user"` }
type KubeUserDef ¶
type ListOfIntents ¶
ListOfIntents is a list of intents
type LogicalCloud ¶
type LogicalCloud struct { MetaData MetaDataList `json:"metadata"` Specification Spec `json:"spec"` }
LogicalCloud contains the parameters needed for a Logical Cloud
type LogicalCloudClient ¶
type LogicalCloudClient struct {
// contains filtered or unexported fields
}
LogicalCloudClient implements the LogicalCloudManager It will also be used to maintain some localized state
func NewLogicalCloudClient ¶
func NewLogicalCloudClient() *LogicalCloudClient
LogicalCloudClient returns an instance of the LogicalCloudClient which implements the LogicalCloudManager
func (*LogicalCloudClient) Create ¶
func (v *LogicalCloudClient) Create(project string, c LogicalCloud) (LogicalCloud, error)
Create entry for the logical cloud resource in the database
func (*LogicalCloudClient) Delete ¶
func (v *LogicalCloudClient) Delete(project, logicalCloudName string) error
Delete the Logical Cloud entry from database
func (*LogicalCloudClient) Get ¶
func (v *LogicalCloudClient) Get(project, logicalCloudName string) (LogicalCloud, error)
Get returns Logical Cloud corresponding to logical cloud name
func (*LogicalCloudClient) GetAll ¶
func (v *LogicalCloudClient) GetAll(project string) ([]LogicalCloud, error)
GetAll returns Logical Clouds in the project
func (*LogicalCloudClient) Update ¶
func (v *LogicalCloudClient) Update(project, logicalCloudName string, c LogicalCloud) (LogicalCloud, error)
Update an entry for the Logical Cloud in the database
type LogicalCloudKey ¶
type LogicalCloudKey struct { Project string `json:"project"` LogicalCloudName string `json:"logical-cloud-name"` }
LogicalCloudKey is the key structure that is used in the database
type LogicalCloudManager ¶
type LogicalCloudManager interface { Create(project string, c LogicalCloud) (LogicalCloud, error) Get(project, name string) (LogicalCloud, error) GetAll(project string) ([]LogicalCloud, error) Delete(project, name string) error Update(project, name string, c LogicalCloud) (LogicalCloud, error) }
LogicalCloudManager is an interface that exposes the connection functionality
type MetaData ¶
type MetaData struct { Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` UserData1 string `json:"userData1,omitempty"` UserData2 string `json:"userData2,omitempty"` }
MetaData has - name, description, userdata1, userdata2
type MetaDataList ¶
type MetaDataList struct { LogicalCloudName string `json:"name"` Description string `json:"description"` UserData1 string `json:"userData1"` UserData2 string `json:"userData2"` }
MetaData contains the parameters needed for metadata
type MetadataList ¶
type MetadataList struct {
Namespace string `yaml:"namespace"`
}
TODO move into a better place or reuse existing struct
type MigrateJson ¶
type MigrateJson struct { MetaData UpdateMetadata `json:"metadata,omitempty"` Spec MigrateSpec `json:"spec"` }
MigrateJson contains metadata and spec for migrate API
type MigrateSpec ¶
type OverrideValues ¶
type OverrideValues struct { AppName string `json:"app-name"` ValuesObj map[string]string `json:"values"` }
OverrideValues has appName and ValuesObj
type PrioritizedControlList ¶
type PrioritizedControlList struct {
// contains filtered or unexported fields
}
PrioritizedControlList contains PrioritizedList of PlacementControllers and ActionControllers
type PriorityQueue ¶
type PriorityQueue []*ControllerElement
PriorityQueue is the heapArray to store the Controllers
func (PriorityQueue) Len ¶
func (pq PriorityQueue) Len() int
func (PriorityQueue) Less ¶
func (pq PriorityQueue) Less(i, j int) bool
func (*PriorityQueue) Pop ¶
func (pq *PriorityQueue) Pop() interface{}
Pop method returns the controller with the highest priority
func (*PriorityQueue) Push ¶
func (pq *PriorityQueue) Push(c interface{})
Push method add a controller into the heapArray
func (PriorityQueue) Swap ¶
func (pq PriorityQueue) Swap(i, j int)
type Project ¶
type Project struct {
MetaData ProjectMetaData `json:"metadata"`
}
Project contains the metaData for Projects
type ProjectClient ¶
type ProjectClient struct {
// contains filtered or unexported fields
}
ProjectClient implements the ProjectManager It will also be used to maintain some localized state
func NewProjectClient ¶
func NewProjectClient() *ProjectClient
NewProjectClient returns an instance of the ProjectClient which implements the ProjectManager
func (*ProjectClient) CreateProject ¶
func (v *ProjectClient) CreateProject(p Project, exists bool) (Project, error)
CreateProject a new collection based on the project
func (*ProjectClient) DeleteProject ¶
func (v *ProjectClient) DeleteProject(name string) error
DeleteProject the Project from database
func (*ProjectClient) GetAllProjects ¶
func (v *ProjectClient) GetAllProjects() ([]Project, error)
GetAllProjects returns all the projects
func (*ProjectClient) GetProject ¶
func (v *ProjectClient) GetProject(name string) (Project, error)
GetProject returns the Project for corresponding name
type ProjectKey ¶
type ProjectKey struct {
ProjectName string `json:"project"`
}
ProjectKey is the key structure that is used in the database
func (ProjectKey) String ¶
func (pk ProjectKey) String() string
We will use json marshalling to convert to string to preserve the underlying structure.
type ProjectManager ¶
type ProjectManager interface { CreateProject(pr Project, exists bool) (Project, error) GetProject(name string) (Project, error) DeleteProject(name string) error GetAllProjects() ([]Project, error) }
ProjectManager is an interface exposes the Project functionality
type ProjectMetaData ¶
type ProjectMetaData struct { Name string `json:"name"` Description string `json:"description"` UserData1 string `json:"userData1"` UserData2 string `json:"userData2"` }
ProjectMetaData contains the parameters for creating a project
type RollbackJson ¶
type RollbackJson struct { MetaData UpdateMetadata `json:"metadata,omitempty"` Spec RollbackSpec `json:"spec"` }
RollbackJson contains metadata and spec for rollback API
type RollbackSpec ¶
type RollbackSpec struct {
Revison string `json:"revision"`
}
type Spec ¶
type Spec struct { NameSpace string `json:"namespace"` Level string `json:"level"` User UserData `json:"user"` }
Spec contains the parameters needed for spec
type SpecData ¶
type SpecData struct { AppName string `json:"app-name,omitempty"` Intent gpic.IntentStruc `json:"intent,omitempty"` }
SpecData consists of appName and intent
type UpdateMetadata ¶
type UpdateMetadata struct {
Description string `json:"description"`
}
type UserData ¶
type UserData struct { UserName string `json:"user-name"` Type string `json:"type"` UserPermissions []UserPerm `json:"user-permissions"` }
UserData contains the parameters needed for user
type UserPerm ¶
type UserPerm struct { PermName string `json:"permission-name"` APIGroups []string `json:"apiGroups"` Resources []string `json:"resources"` Verbs []string `json:"verbs"` }
UserPerm contains the parameters needed for user permissions
type Utility ¶
type Utility interface { DBInsert(storeName string, key db.Key, query interface{}, meta string, c interface{}) error DBFind(storeName string, key db.Key, meta string) ([][]byte, error) DBUnmarshal(value []byte, out interface{}) error DBRemove(storeName string, key db.Key) error CheckProject(project string) error CheckLogicalCloud(project, logicalCloud string) error GetLogicalCloudContext(storeName string, key db.Key, meta string, project string, name string) (appcontext.AppContext, string, error) GetLogicalCloudFromContext(storeName string, appContextId string) (string, string, error) GetAppContextStatus(ac appcontext.AppContext) (*appcontext.AppContextStatus, error) }
Interface facilitates unit testing by mocking functions
Source Files ¶
- add_intents.go
- app.go
- appContextMaker.go
- app_intent.go
- app_profile.go
- cluster.go
- composite_profile.go
- compositeapp.go
- deployment_intent_groups.go
- generic_placement_intent.go
- instantiation.go
- instantiation_appcontext_helper.go
- instantiation_scheduler_helper.go
- logicalcloud.go
- module.go
- project.go
- update.go
- update_scheduler_helper.go