generate and update Magic Module resource definitions
Project description
magic-module-skaffolder
generates or updates a Magic Module Resource definitions with the metadata of the Google Cloud APIs.
When generating the definitions, it will first use the ga
interface, and
supplement the definition with the beta
interface, so that it can
determine which fields are only available on the beta
interface.
The resulting definitions are not perfect and may need some polishing. Most properties required by the magic module are derived from the free text description field. So, please do check the result.
Existing field definitions are not overwritten, so once inspected and correct you can rerun the merge operation as often as you want. Note that fields of a resource which do not exist in the API are removed.
example - update
To update an existing resource definition, type:
$ mm-skaffolder update --inplace --resource-file tests/mmv1/products/compute/BackendService.yaml
INFO: adding port as ga field to definition of BackendService
INFO: adding kind as ga field to definition of BackendService
INFO: adding network as ga field to definition of BackendService
INFO: adding maxStreamDuration as ga field to definition of BackendService
INFO: adding region as ga field to definition of BackendService
INFO: adding connectionTrackingPolicy as ga field to definition of BackendService
INFO: adding failoverPolicy as ga field to definition of BackendService
INFO: adding subsetting as ga field to definition of BackendService
INFO: adding selfLink as ga field to definition of BackendService
INFO: adding serviceBindings as ga field to definition of BackendService
INFO: adding failover as ga field to definition of BackendService.backends.
INFO: keeping beta field connectTimeout from definition of BackendService.circuitBreakers in ga
INFO: adding requestCoalescing as ga field to definition of BackendService.cdnPolicy
INFO: adding signedUrlKeyNames as ga field to definition of BackendService.cdnPolicy
INFO: adding bypassCacheOnRequestHeaders as ga field to definition of BackendService.cdnPolicy
WARNING: mismatch in field name BackendService.localityLbPolicies: expected "localityLbPolicyConfig" defined ""
INFO: adding optionalFields as ga field to definition of BackendService.logConfig
INFO: adding optionalMode as ga field to definition of BackendService.logConfig
WARNING: mismatch in field name BackendService.localityLbPolicies: expected "localityLbPolicyConfig" defined ""
INFO: adding authentication as beta field to definition of BackendService.securitySettings
INFO: adding awsV4Authentication as beta field to definition of BackendService.securitySettings
INFO: adding subsetSize as beta field to definition of BackendService.subsetting
example - generate
To generate a new resource definition, type:
$ mm-skaffolder generate \
--product-directory tests/mmv1/products/networksecurity \
serverTlsPolicies addressGroups
INFO: Writing to definition of ServerTlsPolicy to tests/mmv1/products/networksecurity/ServerTlsPolicy.yaml
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file magic-module-skaffolder-0.0.3.tar.gz
.
File metadata
- Download URL: magic-module-skaffolder-0.0.3.tar.gz
- Upload date:
- Size: 30.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73bee685445d82153309f27de392783e0ea9d0ffe5aea5a59f087404c555f7c6 |
|
MD5 | 9572ee8347578a4c8f73d51d68c5e92b |
|
BLAKE2b-256 | d5c4cd26b5cae3cc530a7707b0aa7a670513458fa01d695ce388f99d55441af4 |
File details
Details for the file magic_module_skaffolder-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: magic_module_skaffolder-0.0.3-py3-none-any.whl
- Upload date:
- Size: 12.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7fde9ed1bc77d05bab4c9b8001333d7ec3a607ff1f10f9da585aa534970d1649 |
|
MD5 | 8c60b177752ba73de4c69f3e7e57b74f |
|
BLAKE2b-256 | 18d2be7dcb8a83b5859e26b542ee9c2f7b851414d4d25b7e6ef608572029dd8e |