From 4db40ca97a56e18c19db8347b72684e3217aee3e Mon Sep 17 00:00:00 2001 From: Travis Nielsen Date: Tue, 30 Aug 2016 16:56:43 -0700 Subject: [PATCH] Rename the orchestration methods --- pkg/castled/monagent.go | 4 ++-- pkg/castled/monleader.go | 4 ++-- pkg/castled/osdagent.go | 4 ++-- pkg/castled/osdleader.go | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pkg/castled/monagent.go b/pkg/castled/monagent.go index 469cc9e8a..8f0fdba08 100644 --- a/pkg/castled/monagent.go +++ b/pkg/castled/monagent.go @@ -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 } diff --git a/pkg/castled/monleader.go b/pkg/castled/monleader.go index c0b0ecdc6..132419a83 100644 --- a/pkg/castled/monleader.go +++ b/pkg/castled/monleader.go @@ -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 diff --git a/pkg/castled/osdagent.go b/pkg/castled/osdagent.go index bd0a6f4aa..c8d46a517 100644 --- a/pkg/castled/osdagent.go +++ b/pkg/castled/osdagent.go @@ -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 } diff --git a/pkg/castled/osdleader.go b/pkg/castled/osdleader.go index 4599ce5ba..c757360c4 100644 --- a/pkg/castled/osdleader.go +++ b/pkg/castled/osdleader.go @@ -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