Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,8 @@ Press `Esc` to return to the previous resource and selection.
| **Octavia / Load Balancing** | load balancers, listeners, pools, members | ✅ |
| **Octavia / Load Balancing** | health monitors, L7 policies, L7 rules | ✅ |
| **Barbican / Key Manager** | secrets, secret containers, orders | ✅ |
| **Manila / Shared File Systems** | shares, share snapshots, share networks, share types | ✅ |
| **Manila / Shared File Systems** | share replicas, access rules, export locations | ✅ |
| **Trove / Databases** | instances | ⬜ |

> [!CAUTION]
Expand Down Expand Up @@ -263,6 +265,13 @@ Press `Esc` to return to the previous resource and selection.
| Barbican / Key Manager | Secrets | `secrets` | `secret` |
| Barbican / Key Manager | Secret Containers | `secret-containers` | `secret-container` |
| Barbican / Key Manager | Orders | `orders` | `order` |
| Manila / Shared File Systems | Shares | `shares` | `share` |
| Manila / Shared File Systems | Share Snapshots | `share-snapshots` | `share-snapshot` |
| Manila / Shared File Systems | Share Replicas | `share-replicas` | `share-replica` |
| Manila / Shared File Systems | Share Networks | `share-networks` | `share-network` |
| Manila / Shared File Systems | Share Types | `share-types` | `share-type` |
| Manila / Shared File Systems | Share Access Rules | `share-access-rules` | `share-access-rule` |
| Manila / Shared File Systems | Share Export Locations | `share-export-locations` | `share-export-location` |
| Designate / DNS | Zones | `zones` | `zone`, `dns-zones`, `dns-zone` |
| Designate / DNS | Recordsets | `recordsets` | `recordset`, `records`, `record` |

Expand Down
39 changes: 37 additions & 2 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@ import (
"github.com/akyriako/o7k/internal/resources/orchestration/stackresources"
"github.com/akyriako/o7k/internal/resources/orchestration/stacks"
pluginresource "github.com/akyriako/o7k/internal/resources/plugins"
"github.com/akyriako/o7k/internal/resources/sharedfilesystem/accessrules"
"github.com/akyriako/o7k/internal/resources/sharedfilesystem/exportlocations"
"github.com/akyriako/o7k/internal/resources/sharedfilesystem/replicas"
"github.com/akyriako/o7k/internal/resources/sharedfilesystem/sharenetworks"
"github.com/akyriako/o7k/internal/resources/sharedfilesystem/shares"
"github.com/akyriako/o7k/internal/resources/sharedfilesystem/sharetypes"
manilasnapshots "github.com/akyriako/o7k/internal/resources/sharedfilesystem/snapshots"
"github.com/akyriako/o7k/internal/version"
tea "github.com/charmbracelet/bubbletea"

Expand Down Expand Up @@ -249,6 +256,10 @@ func printPluginUsage() {
}

func registerAll(r *resource.Registry, openstackContext *openstack.Context) (errs error) {
if err := r.Register(aliases.New(r)); err != nil {
return fmt.Errorf("registering aliases resource: %w", err)
}

if err := r.Register(catalog.New(openstackContext)); err != nil {
errs = errors.Join(errs, fmt.Errorf("registering catalog resource: %w", err))
}
Expand Down Expand Up @@ -413,8 +424,32 @@ func registerAll(r *resource.Registry, openstackContext *openstack.Context) (err
return fmt.Errorf("registering orders resource: %w", err)
}

if err := r.Register(aliases.New(r)); err != nil {
return fmt.Errorf("registering aliases resource: %w", err)
if err := r.Register(shares.New(openstackContext)); err != nil {
errs = errors.Join(errs, fmt.Errorf("registering shares resource: %w", err))
}

if err := r.Register(manilasnapshots.New(openstackContext)); err != nil {
errs = errors.Join(errs, fmt.Errorf("registering share snapshots resource: %w", err))
}

if err := r.Register(replicas.New(openstackContext)); err != nil {
errs = errors.Join(errs, fmt.Errorf("registering share replicas resource: %w", err))
}

if err := r.Register(sharenetworks.New(openstackContext)); err != nil {
errs = errors.Join(errs, fmt.Errorf("registering share networks resource: %w", err))
}

if err := r.RegisterNavigationOnly(accessrules.New(openstackContext)); err != nil {
errs = errors.Join(errs, fmt.Errorf("registering share access rules resource: %w", err))
}

if err := r.Register(sharetypes.New(openstackContext)); err != nil {
errs = errors.Join(errs, fmt.Errorf("registering share types resource: %w", err))
}

if err := r.RegisterNavigationOnly(exportlocations.New(openstackContext)); err != nil {
errs = errors.Join(errs, fmt.Errorf("registering share export locations resource: %w", err))
}

return errs
Expand Down
19 changes: 19 additions & 0 deletions internal/openstack/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,11 @@ func (c *Context) ObjectStorageV1() (*gophercloud.ServiceClient, error) {
return c.getClientService("object-storage", gophercloud.EndpointOpts{Region: c.Region}, openstack.NewObjectStorageV1)
}

//
//func (c *Context) SharedFileSystemV2() (*gophercloud.ServiceClient, error) {
// return c.getClientService("shared-file-system", gophercloud.EndpointOpts{Region: c.Region}, openstack.NewSharedFileSystemV2)
//}

type clientServiceBuilder func(*gophercloud.ProviderClient, gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error)

func (c *Context) getClientService(key string, opts gophercloud.EndpointOpts, builder clientServiceBuilder) (*gophercloud.ServiceClient, error) {
Expand All @@ -155,3 +160,17 @@ func (c *Context) getClientService(key string, opts gophercloud.EndpointOpts, bu
actual, _ := c.serviceClients.LoadOrStore(key, client)
return actual.(*gophercloud.ServiceClient), nil
}

func (c *Context) SharedFileSystemV2() (*gophercloud.ServiceClient, error) {
return c.getClientService("shared-file-system", gophercloud.EndpointOpts{Region: c.Region}, newSharedFileSystemV2)
}

func newSharedFileSystemV2(provider *gophercloud.ProviderClient, opts gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error) {
client, err := openstack.NewSharedFileSystemV2(provider, opts)
if err != nil {
return nil, err
}

client.Microversion = "2.60"
return client, nil
}
2 changes: 1 addition & 1 deletion internal/resources/blockstorage/backups/backups.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func (r *Resource) Kind() string {
}

func (r *Resource) Title() string {
return "Volume Backups"
return "Cinder Volume Backups"
}

func (r *Resource) Aliases() []string {
Expand Down
2 changes: 1 addition & 1 deletion internal/resources/blockstorage/snapshots/snapshots.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func (r *Resource) Kind() string {
}

func (r *Resource) Title() string {
return "Snapshots"
return "Cinder Snapshots"
}

func (r *Resource) Aliases() []string {
Expand Down
2 changes: 1 addition & 1 deletion internal/resources/blockstorage/volumes/volumes.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func (r *Resource) Kind() string {
}

func (r *Resource) Title() string {
return "Volumes"
return "Cinder Volumes"
}

func (r *Resource) Aliases() []string {
Expand Down
2 changes: 1 addition & 1 deletion internal/resources/blockstorage/volumetypes/volumetypes.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func (r *Resource) Kind() string {
}

func (r *Resource) Title() string {
return "Volume Types"
return "Cinder Volume Types"
}

func (r *Resource) Aliases() []string {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func (r *Resource) Kind() string {
}

func (r *Resource) Title() string {
return "Availability Zones"
return "Compute Availability Zones"
}

func (r *Resource) Aliases() []string {
Expand Down
2 changes: 1 addition & 1 deletion internal/resources/compute/flavors/flavors.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func (r *Resource) Kind() string {
}

func (r *Resource) Title() string {
return "Flavors"
return "Compute Flavors"
}

func (r *Resource) Aliases() []string {
Expand Down
2 changes: 1 addition & 1 deletion internal/resources/compute/keypairs/keypairs.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func (r *Resource) Kind() string {
}

func (r *Resource) Title() string {
return "Keypairs"
return "Compute Keypairs"
}

func (r *Resource) Aliases() []string {
Expand Down
2 changes: 1 addition & 1 deletion internal/resources/compute/servergroups/servergroups.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func (r *Resource) Kind() string {
}

func (r *Resource) Title() string {
return "Server Groups"
return "Compute Server Groups"
}

func (r *Resource) Aliases() []string {
Expand Down
2 changes: 1 addition & 1 deletion internal/resources/compute/servers/servers.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func New(context *openstack.Context) *Resource {
}

func (r *Resource) Title() string {
return "Servers"
return "Compute Servers"
}

func (r *Resource) Kind() string {
Expand Down
2 changes: 1 addition & 1 deletion internal/resources/dns/recordsets/recordsets.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func New(context *openstack.Context) *Resource {
}

func (r *Resource) Title() string {
return "DNS Recordsets"
return "Designate DNS Recordsets"
}

func (r *Resource) Kind() string {
Expand Down
2 changes: 1 addition & 1 deletion internal/resources/dns/zones/zones.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func New(context *openstack.Context) *Resource {
}

func (r *Resource) Title() string {
return "DNS Zones"
return "Designate DNS Zones"
}

func (r *Resource) Kind() string {
Expand Down
2 changes: 1 addition & 1 deletion internal/resources/identity/catalog/catalog.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func (r *Resource) Kind() string {
}

func (r *Resource) Title() string {
return "Catalog"
return "Keystone Catalog"
}

func (r *Resource) Aliases() []string {
Expand Down
2 changes: 1 addition & 1 deletion internal/resources/identity/domains/domains.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func (r *Resource) Kind() string {
}

func (r *Resource) Title() string {
return "Domains"
return "Keystone Domains"
}

func (r *Resource) Aliases() []string {
Expand Down
2 changes: 1 addition & 1 deletion internal/resources/identity/endpoints/endpoints.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func (r *Resource) Kind() string {
}

func (r *Resource) Title() string {
return "Endpoints"
return "Keystone Endpoints"
}

func (r *Resource) Aliases() []string {
Expand Down
2 changes: 1 addition & 1 deletion internal/resources/identity/projects/projects.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func (r *Resource) Kind() string {
}

func (r *Resource) Title() string {
return "Projects"
return "Keystone Projects"
}

func (r *Resource) Aliases() []string {
Expand Down
2 changes: 1 addition & 1 deletion internal/resources/identity/regions/regions.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func (r *Resource) Kind() string {
}

func (r *Resource) Title() string {
return "Regions"
return "Keystone Regions"
}

func (r *Resource) Aliases() []string {
Expand Down
2 changes: 1 addition & 1 deletion internal/resources/identity/roles/roles.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func (r *Resource) Kind() string {
}

func (r *Resource) Title() string {
return "Roles"
return "Keystone Roles"
}

func (r *Resource) Aliases() []string {
Expand Down
2 changes: 1 addition & 1 deletion internal/resources/identity/services/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func (r *Resource) Kind() string {
}

func (r *Resource) Title() string {
return "Services"
return "Keystone Services"
}

func (r *Resource) Aliases() []string {
Expand Down
2 changes: 1 addition & 1 deletion internal/resources/images/images.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func (r *Resource) Kind() string {
}

func (r *Resource) Title() string {
return "Images"
return "Glance Images"
}

func (r *Resource) Aliases() []string {
Expand Down
2 changes: 1 addition & 1 deletion internal/resources/keymanager/containers/containers.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func (r *Resource) Kind() string {
}

func (r *Resource) Title() string {
return "Secret Containers"
return "Barbican Secret Containers"
}

func (r *Resource) Aliases() []string {
Expand Down
2 changes: 1 addition & 1 deletion internal/resources/keymanager/orders/orders.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func (r *Resource) Kind() string {
}

func (r *Resource) Title() string {
return "Orders"
return "Barbican Orders"
}

func (r *Resource) Aliases() []string {
Expand Down
2 changes: 1 addition & 1 deletion internal/resources/keymanager/secrets/secrets.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func (r *Resource) Kind() string {
}

func (r *Resource) Title() string {
return "Secrets"
return "Barbican Secrets"
}

func (r *Resource) Aliases() []string {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func New(context *openstack.Context) *Resource {
}

func (r *Resource) Title() string {
return "Health Monitors"
return "Octavia Health Monitors"
}

func (r *Resource) Kind() string {
Expand Down
2 changes: 1 addition & 1 deletion internal/resources/loadbalancing/l7policies/l7policies.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func New(context *openstack.Context) *Resource {
}

func (r *Resource) Title() string {
return "L7 Policies"
return "Octavia L7 Policies"
}

func (r *Resource) Kind() string {
Expand Down
2 changes: 1 addition & 1 deletion internal/resources/loadbalancing/l7rules/l7rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func New(context *openstack.Context) *Resource {
}

func (r *Resource) Title() string {
return "L7 Rules"
return "Octavia L7 Rules"
}

func (r *Resource) Kind() string {
Expand Down
2 changes: 1 addition & 1 deletion internal/resources/loadbalancing/listeners/listeners.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func New(context *openstack.Context) *Resource {
}

func (r *Resource) Title() string {
return "Listeners"
return "Octavia Listeners"
}

func (r *Resource) Kind() string {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func New(context *openstack.Context) *Resource {
}

func (r *Resource) Title() string {
return "Load Balancers"
return "Octavia Load Balancers"
}

func (r *Resource) Kind() string {
Expand Down
2 changes: 1 addition & 1 deletion internal/resources/loadbalancing/members/members.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func New(context *openstack.Context) *Resource {
}

func (r *Resource) Title() string {
return "Members"
return "Octavia Pools Members"
}

func (r *Resource) Kind() string {
Expand Down
2 changes: 1 addition & 1 deletion internal/resources/loadbalancing/pools/pools.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func New(context *openstack.Context) *Resource {
}

func (r *Resource) Title() string {
return "Pools"
return "Octavia Pools"
}

func (r *Resource) Kind() string {
Expand Down
2 changes: 1 addition & 1 deletion internal/resources/networking/floatingips/floatingips.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func (r *Resource) Kind() string {
}

func (r *Resource) Title() string {
return "Floating IPs"
return "Neutron Floating IPs"
}

func (r *Resource) Aliases() []string {
Expand Down
2 changes: 1 addition & 1 deletion internal/resources/networking/networks/networks.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func (r *Resource) Kind() string {
}

func (r *Resource) Title() string {
return "Networks"
return "Neutron Networks"
}

func (r *Resource) Aliases() []string {
Expand Down
Loading
Loading