npearce / CaC-Github_Webhook_Server

Automated Network Configuration-as-Code (NCaC) deployments using Github webhook to F5 BIG-IP.
https://redtalks.live/cac/
MIT License
14 stars 5 forks source link

Improve AS3 Service Definition validation #35

Closed npearce closed 6 years ago

npearce commented 6 years ago

Currently only checking for 'action':

if (typeof service_def.action !== undefined && service_def.action === 'deploy' || service_def.action === 'dry-run') {

Proposed verification of 'action' and 'declaration.class' before proceeding:

if (typeof service_def.action !== undefined && typeof service_def.declaration.class !== undefined && service_def.declaration.class === 'ADC' && service_def.action === 'deploy' || service_def.action === 'dry-run') {
npearce commented 6 years ago

Implemented and tested.