-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This change adds the most basic commands for interacting with resource providers and resource types. Also added some flexibility to existing commands for resources so they can work with UDTs. - `rad resourceprovider` - `list` - `show` - `delete` - `rad resourcetype` - `list` - `show` Also added `rad resource create`. We never implemented anything like this, it was just missing. Also enhanced the `rad resource` family of commands to support any fully-qualified resource type. These commands now how to validate and work with the set of built-in types in Radius today using short names like `containers`. This set of commands are the easy decisions, and already work well using the existing functionality in the implementation. We'll add some of the more complex commands after a design dicussion. Signed-off-by: Ryan Nowak <nowakra@gmail.com>
- Loading branch information
Showing
27 changed files
with
2,990 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
Copyright 2023 The Radius Authors. | ||
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 | ||
http://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 cmd | ||
|
||
import ( | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
func init() { | ||
RootCmd.AddCommand(resourceProviderCmd) | ||
resourceProviderCmd.PersistentFlags().StringP("workspace", "w", "", "The workspace name") | ||
} | ||
|
||
func NewResourceProviderCommand() *cobra.Command { | ||
return &cobra.Command{ | ||
Use: "resourceprovider", | ||
Short: "Manage resource providers", | ||
Long: `Manage resource providers`, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
Copyright 2023 The Radius Authors. | ||
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 | ||
http://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 cmd | ||
|
||
import ( | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
func init() { | ||
RootCmd.AddCommand(resourceTypeCmd) | ||
resourceTypeCmd.PersistentFlags().StringP("workspace", "w", "", "The workspace name") | ||
} | ||
|
||
func NewResourceTypeCommand() *cobra.Command { | ||
return &cobra.Command{ | ||
Use: "resourcetype", | ||
Short: "Manage resource types", | ||
Long: `Manage resource types`, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.