Skip to content

Conversation

@felix-kaestner
Copy link
Contributor

@felix-kaestner felix-kaestner commented Aug 4, 2025

This cli is meant to be used for testing and development of the provider implementation. It can be used to directly invoke the provider for a given k8s resource, without the need to deploy the full operator, leading to short development cycles.

Getting Started

The cli can be invoked either via:

  1. Using go run
go run ./hack/provider/main.go
  1. Building the binary using make
# Build the binary
make netop-provider

# Run the binary
./build/netop-provider

Usage

Usage: ./build/netop-provider [flags] <create|delete>

A debug tool for testing provider implementations.

Arguments:
  create|delete    Operation to perform on the resource

Flags:
  -address string
        API endpoint address (required)
  -file string
        Path to Kubernetes resource manifest file (required)
  -password string
        Password for authentication (required)
  -provider string
        Provider implementation to use (default "openconfig")
  -username string
        Username for authentication (required)

Example:
  ./build/netop-provider -address=192.168.1.1:9339 -username=admin -password=secret -file=config/samples/v1alpha1_interface.yaml create

Sample Output

=== Operation Status ===
Would create resource on device 192.168.1.1:9339
Provider tool completed successfully.
=== Debug Tool Configuration ===
Address: 192.168.1.1:9339
Username: admin
Password: [REDACTED]
Resource File: config/samples/v1alpha1_interface.yaml
Provider: openconfig
Operation: create

=== Resource Information ===
Loaded Interface: lo0
  Namespace: default
  Interface Name: lo0
  Admin State: Up

=== Operation Status ===
Provider tool completed successfully.

@hardikdr hardikdr added the area/metal-automation Automation processes within the Metal project. label Aug 5, 2025
@hardikdr hardikdr added this to Roadmap Aug 5, 2025
This cli is meant to be used for testing and development of the provider
implementation. It can be used to directly invoke the provider for a
given k8s resource, without the need to deploy the full operator,
leading to short development cycles.
@felix-kaestner felix-kaestner merged commit 1105368 into main Aug 12, 2025
8 checks passed
@github-project-automation github-project-automation bot moved this to Done in Roadmap Aug 12, 2025
@felix-kaestner felix-kaestner deleted the provider-cli branch August 12, 2025 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/metal-automation Automation processes within the Metal project.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants