Skip to main content

magic-module-scaffolder

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-scaffolder 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-scaffolder generate \
   --product-directory tests/mmv1/products/networksecurity \
   serverTlsPolicies addressGroups
INFO: Writing to definition of ServerTlsPolicy to tests/mmv1/products/networksecurity/ServerTlsPolicy.yaml

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

magic-module-scaffolder-0.0.5.tar.gz (32.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

magic_module_scaffolder-0.0.5-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

File details

Details for the file magic-module-scaffolder-0.0.5.tar.gz.

File metadata

  • Download URL: magic-module-scaffolder-0.0.5.tar.gz
  • Upload date:
  • Size: 32.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.11

File hashes

Hashes for magic-module-scaffolder-0.0.5.tar.gz
Algorithm Hash digest
SHA256 5e9085a3ac095d47e2a9a631258291514a4fa0d908c645f699bff8c846b32733
MD5 3bc49c82b181c5df702966c082d94aca
BLAKE2b-256 99121ba0bc352cdb8053bd139938a9cbcbb67610f158e47d76b9c46ddbfc7f51

See more details on using hashes here.

File details

Details for the file magic_module_scaffolder-0.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for magic_module_scaffolder-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 2bf6eb440e234fe316f0bd3019f8b148fde52ae6840b1318ff64a5a32480b5e4
MD5 1954cbd803d01703fcd00aef6f143213
BLAKE2b-256 3152ba63ae2a6d74bb01212072e3f2d0355e125316ae50c9f7e59d90133835c8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page