Merge "Remove `image build` command"

This commit is contained in:
Zuul 2021-03-10 08:23:00 +00:00 committed by Gerrit Code Review
commit 2351051ffd
10 changed files with 0 additions and 185 deletions

View File

@ -1,39 +0,0 @@
/*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package image
import (
"github.com/spf13/cobra"
"opendev.org/airship/airshipctl/pkg/config"
"opendev.org/airship/airshipctl/pkg/phase"
)
// NewImageBuildCommand creates a new command with the capability to build ISO image.
func NewImageBuildCommand(cfgFactory config.Factory) *cobra.Command {
cmd := &cobra.Command{
Use: "build",
Short: "Build ISO image",
RunE: func(cmd *cobra.Command, args []string) error {
p := &phase.RunCommand{
Factory: cfgFactory,
}
p.Options.PhaseID.Name = config.BootstrapPhase
return p.RunE()
},
}
return cmd
}

View File

@ -1,33 +0,0 @@
/*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package image
import (
"github.com/spf13/cobra"
"opendev.org/airship/airshipctl/pkg/config"
)
// NewImageCommand creates a new command for managing ISO images using airshipctl.
func NewImageCommand(cfgFactory config.Factory) *cobra.Command {
imageRootCmd := &cobra.Command{
Use: "image",
Short: "Manage ISO image creation",
}
imageRootCmd.AddCommand(NewImageBuildCommand(cfgFactory))
return imageRootCmd
}

View File

@ -1,36 +0,0 @@
/*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package image_test
import (
"testing"
"opendev.org/airship/airshipctl/cmd/image"
"opendev.org/airship/airshipctl/testutil"
)
func TestImage(t *testing.T) {
tests := []*testutil.CmdTest{
{
Name: "image-with-help",
CmdLine: "-h",
Cmd: image.NewImageCommand(nil),
},
}
for _, tt := range tests {
testutil.RunTest(t, tt)
}
}

View File

@ -1,13 +0,0 @@
Manage ISO image creation
Usage:
image [command]
Available Commands:
build Build ISO image
help Help about any command
Flags:
-h, --help help for image
Use "image [command] --help" for more information about a command.

View File

@ -27,7 +27,6 @@ import (
"opendev.org/airship/airshipctl/cmd/completion"
"opendev.org/airship/airshipctl/cmd/config"
"opendev.org/airship/airshipctl/cmd/document"
"opendev.org/airship/airshipctl/cmd/image"
"opendev.org/airship/airshipctl/cmd/phase"
"opendev.org/airship/airshipctl/cmd/plan"
"opendev.org/airship/airshipctl/cmd/secret"
@ -75,7 +74,6 @@ func AddDefaultAirshipCTLCommands(cmd *cobra.Command, factory cfg.Factory) *cobr
cmd.AddCommand(completion.NewCompletionCommand())
cmd.AddCommand(document.NewDocumentCommand(factory))
cmd.AddCommand(config.NewConfigCommand(factory))
cmd.AddCommand(image.NewImageCommand(factory))
cmd.AddCommand(secret.NewSecretCommand(factory))
cmd.AddCommand(phase.NewPhaseCommand(factory))
cmd.AddCommand(plan.NewPlanCommand(factory))

View File

@ -10,7 +10,6 @@ Available Commands:
config Manage the airshipctl config file
document Manage deployment documents
help Help about any command
image Manage ISO image creation
phase Manage phases
plan Manage plans
secret Manage secrets

View File

@ -21,7 +21,6 @@ A unified entrypoint to various airship components
* [airshipctl completion](airshipctl_completion.md) - Generate completion script for the specified shell (bash or zsh)
* [airshipctl config](airshipctl_config.md) - Manage the airshipctl config file
* [airshipctl document](airshipctl_document.md) - Manage deployment documents
* [airshipctl image](airshipctl_image.md) - Manage ISO image creation
* [airshipctl phase](airshipctl_phase.md) - Manage phases
* [airshipctl plan](airshipctl_plan.md) - Manage plans
* [airshipctl secret](airshipctl_secret.md) - Manage secrets

View File

@ -1,26 +0,0 @@
## airshipctl image
Manage ISO image creation
### Synopsis
Manage ISO image creation
### Options
```
-h, --help help for image
```
### Options inherited from parent commands
```
--airshipconf string Path to file for airshipctl configuration. (default "$HOME/.airship/config")
--debug enable verbose output
```
### SEE ALSO
* [airshipctl](airshipctl.md) - A unified entrypoint to various airship components
* [airshipctl image build](airshipctl_image_build.md) - Build ISO image

View File

@ -1,29 +0,0 @@
## airshipctl image build
Build ISO image
### Synopsis
Build ISO image
```
airshipctl image build [flags]
```
### Options
```
-h, --help help for build
```
### Options inherited from parent commands
```
--airshipconf string Path to file for airshipctl configuration. (default "$HOME/.airship/config")
--debug enable verbose output
```
### SEE ALSO
* [airshipctl image](airshipctl_image.md) - Manage ISO image creation

View File

@ -16,11 +16,6 @@ package config
import "opendev.org/airship/airshipctl/pkg/remote/redfish"
// Constants related to Phases
const (
BootstrapPhase = "bootstrap-iso"
)
// Constants defining default values
const (
AirshipConfig = "config"