forked from rook/rook
Rename the orchestration methods
This commit is contained in:
@@ -18,7 +18,7 @@ type monAgent struct {
|
||||
context *orchestrator.ClusterContext
|
||||
}
|
||||
|
||||
func (a *monAgent) ConfigureAgent(context *orchestrator.ClusterContext) error {
|
||||
func (a *monAgent) ConfigureLocalService(context *orchestrator.ClusterContext) error {
|
||||
a.context = context
|
||||
|
||||
var err error
|
||||
@@ -49,7 +49,7 @@ func (a *monAgent) ConfigureAgent(context *orchestrator.ClusterContext) error {
|
||||
return err
|
||||
}
|
||||
|
||||
func (a *monAgent) DestroyAgent(context *orchestrator.ClusterContext) error {
|
||||
func (a *monAgent) DestroyLocalService(context *orchestrator.ClusterContext) error {
|
||||
a.context = context
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -27,13 +27,13 @@ type monLeader struct {
|
||||
// Load the state of the service from etcd. Typically a service will populate the desired/discovered state and the applied state
|
||||
// from etcd, then compute the difference and cache it.
|
||||
// Returns whether the service has updates to be applied.
|
||||
func (m *monLeader) LoadState(context *orchestrator.ClusterContext) (bool, error) {
|
||||
func (m *monLeader) LoadClusterServiceState(context *orchestrator.ClusterContext) (bool, error) {
|
||||
|
||||
return true, nil
|
||||
}
|
||||
|
||||
// Apply the desired state to the cluster. The context provides all the information needed to make changes to the service.
|
||||
func (m *monLeader) ApplyState(context *orchestrator.ClusterContext) error {
|
||||
func (m *monLeader) ConfigureClusterService(context *orchestrator.ClusterContext) error {
|
||||
|
||||
// Create or get the basic cluster info
|
||||
var err error
|
||||
|
||||
@@ -21,7 +21,7 @@ type osdAgent struct {
|
||||
cluster *clusterInfo
|
||||
}
|
||||
|
||||
func (a *osdAgent) ConfigureAgent(context *orchestrator.ClusterContext) error {
|
||||
func (a *osdAgent) ConfigureLocalService(context *orchestrator.ClusterContext) error {
|
||||
|
||||
var err error
|
||||
a.cluster, err = loadClusterInfo(context.EtcdClient)
|
||||
@@ -55,7 +55,7 @@ func (a *osdAgent) ConfigureAgent(context *orchestrator.ClusterContext) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (a *osdAgent) DestroyAgent(context *orchestrator.ClusterContext) error {
|
||||
func (a *osdAgent) DestroyLocalService(context *orchestrator.ClusterContext) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -15,12 +15,12 @@ type osdLeader struct {
|
||||
// Load the state of the service from etcd. Typically a service will populate the desired/discovered state and the applied state
|
||||
// from etcd, then compute the difference and cache it.
|
||||
// Returns whether the service has updates to be applied.
|
||||
func (m *osdLeader) LoadState(context *orchestrator.ClusterContext) (bool, error) {
|
||||
func (m *osdLeader) LoadClusterServiceState(context *orchestrator.ClusterContext) (bool, error) {
|
||||
return len(context.Inventory.Nodes) > 0, nil
|
||||
}
|
||||
|
||||
// Apply the desired state to the cluster. The context provides all the information needed to make changes to the service.
|
||||
func (m *osdLeader) ApplyState(context *orchestrator.ClusterContext) error {
|
||||
func (m *osdLeader) ConfigureClusterService(context *orchestrator.ClusterContext) error {
|
||||
|
||||
if len(context.Inventory.Nodes) == 0 {
|
||||
// No nodes for OSDs
|
||||
|
||||
Reference in New Issue
Block a user