metalcloud-cli logical-network update¶
Update an existing logical network configuration
Synopsis¶
Update an existing logical network with new configuration from a file or pipe.
This command updates the configuration of an existing logical network. The configuration must be in JSON format and can contain partial updates or complete new configuration.
Arguments: logical_network_id The unique identifier of the logical network to update (required)
Required Flags: –config-source Source of the logical network configuration updates (required) Can be ‘pipe’ to read from stdin or path to a JSON file
Configuration Format: The configuration file must contain a JSON object with the network specification updates. You can provide partial updates (only the fields you want to change) or complete configuration.
Examples:
Update from a configuration file¶
metalcloud-cli logical-network update 12345 –config-source updates.json
Update using pipe input¶
cat updates.json | metalcloud-cli logical-network update 12345 –config-source pipe
Update specific field using jq and pipe¶
echo ‘{“label”: “new-network-name”}’ | metalcloud-cli logical-network update 12345 –config-source pipe
Get current config, edit, and update¶
metalcloud-cli logical-network get 12345 –output json > current.json
Edit current.json with your changes¶
metalcloud-cli logical-network update 12345 –config-source current.json
metalcloud-cli logical-network update logical_network_id [flags]
Options¶
--config-source string Source of the logical network updates. Can be 'pipe' or path to a JSON file.
-h, --help help for update
Options inherited from parent commands¶
-k, --api_key string MetalCloud API key
-c, --config string Config file path
-d, --debug Set to enable debug logging
-e, --endpoint string MetalCloud API endpoint
-f, --format string Output format. Supported values are 'text','csv','md','json','yaml'. (default "text")
-i, --insecure_skip_verify Set to allow insecure transport
-l, --log_file string Log file path
-v, --verbosity string Log level verbosity (default "INFO")
SEE ALSO¶
metalcloud-cli logical-network - Manage logical networks within fabrics