@@ -24,6 +24,7 @@ import (
24
24
"path"
25
25
"path/filepath"
26
26
27
+ "github.com/elastic/cloud-sdk-go/pkg/api/platformapi/configurationtemplateapi"
27
28
"github.com/elastic/cloud-sdk-go/pkg/input"
28
29
"github.com/elastic/cloud-sdk-go/pkg/models"
29
30
sdkcmdutil "github.com/elastic/cloud-sdk-go/pkg/util/cmdutil"
@@ -32,7 +33,6 @@ import (
32
33
33
34
cmdutil "github.com/elastic/ecctl/cmd/util"
34
35
"github.com/elastic/ecctl/pkg/ecctl"
35
- "github.com/elastic/ecctl/pkg/platform/deployment"
36
36
)
37
37
38
38
const (
@@ -60,7 +60,7 @@ var platformDeploymentTemplateListCmd = &cobra.Command{
60
60
stackVersion , _ := cmd .Flags ().GetString (stackVersion )
61
61
metadataFilter , _ := cmd .Flags ().GetString (filter )
62
62
63
- res , err := deployment .ListTemplates (deployment .ListTemplateParams {
63
+ res , err := configurationtemplateapi .ListTemplates (configurationtemplateapi .ListTemplateParams {
64
64
API : ecctl .Get ().API ,
65
65
ShowInstanceConfig : showInstanceConfig ,
66
66
StackVersion : stackVersion ,
@@ -81,8 +81,8 @@ var platformDeploymentTemplateShowCmd = &cobra.Command{
81
81
PreRunE : cobra .MinimumNArgs (1 ),
82
82
RunE : func (cmd * cobra.Command , args []string ) error {
83
83
show , _ := cmd .Flags ().GetBool ("show-instance-configurations" )
84
- res , err := deployment .GetTemplate (deployment .GetTemplateParams {
85
- TemplateParams : deployment .TemplateParams {
84
+ res , err := configurationtemplateapi .GetTemplate (configurationtemplateapi .GetTemplateParams {
85
+ TemplateParams : configurationtemplateapi .TemplateParams {
86
86
API : ecctl .Get ().API ,
87
87
ID : args [0 ],
88
88
},
@@ -102,8 +102,8 @@ var platformDeploymentTemplateDeleteCmd = &cobra.Command{
102
102
Short : "Deletes a specific platform deployment template" ,
103
103
PreRunE : cobra .MinimumNArgs (1 ),
104
104
RunE : func (cmd * cobra.Command , args []string ) error {
105
- err := deployment .DeleteTemplate (deployment .GetTemplateParams {
106
- TemplateParams : deployment .TemplateParams {
105
+ err := configurationtemplateapi .DeleteTemplate (configurationtemplateapi .GetTemplateParams {
106
+ TemplateParams : configurationtemplateapi .TemplateParams {
107
107
API : ecctl .Get ().API ,
108
108
ID : args [0 ],
109
109
},
@@ -136,7 +136,7 @@ var platformDeploymentTemplateCreateCmd = &cobra.Command{
136
136
tc .ID = id
137
137
}
138
138
139
- tid , err := deployment .CreateTemplate (deployment .CreateTemplateParams {
139
+ tid , err := configurationtemplateapi .CreateTemplate (configurationtemplateapi .CreateTemplateParams {
140
140
DeploymentTemplateInfo : tc ,
141
141
API : ecctl .Get ().API ,
142
142
})
@@ -163,9 +163,9 @@ var platformDeploymentTemplateUpdateCmd = &cobra.Command{
163
163
if err != nil {
164
164
return err
165
165
}
166
- if err := deployment .UpdateTemplate (
167
- deployment .UpdateTemplateParams {
168
- TemplateParams : deployment .TemplateParams {
166
+ if err := configurationtemplateapi .UpdateTemplate (
167
+ configurationtemplateapi .UpdateTemplateParams {
168
+ TemplateParams : configurationtemplateapi .TemplateParams {
169
169
API : ecctl .Get ().API ,
170
170
ID : args [0 ],
171
171
},
@@ -188,8 +188,8 @@ var platformDeploymentTemplatePullCmd = &cobra.Command{
188
188
PreRunE : cobra .MaximumNArgs (0 ),
189
189
190
190
RunE : func (cmd * cobra.Command , args []string ) error {
191
- return deployment .PullToFolder (deployment .PullTemplateToFolderParams {
192
- TemplateToFolderParams : deployment .TemplateToFolderParams {
191
+ return configurationtemplateapi .PullToFolder (configurationtemplateapi .PullTemplateToFolderParams {
192
+ TemplateToFolderParams : configurationtemplateapi .TemplateToFolderParams {
193
193
API : ecctl .Get ().API ,
194
194
Folder : cmd .Flag ("path" ).Value .String (),
195
195
},
0 commit comments