agent-claw: automated task changes
This commit is contained in:
1
cdk/node_modules/aws-cdk-lib/aws-ec2/lib/cidr-splits.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-ec2/lib/cidr-splits.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.calculateCidrSplits=calculateCidrSplits;var core_1=()=>{var tmp=require("../../core");return core_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp};function calculateCidrSplits(rootNetmask,netmasks){const ret=new Array;let offset=0;for(const netmask of netmasks){const size=Math.pow(2,32-netmask);offset=nextMultiple(offset,size);const count=Math.pow(2,netmask-rootNetmask);ret.push({count,netmask,index:offset/size}),offset+=size}if(offset>Math.pow(2,32-rootNetmask))throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`CidrSpaceInsufficientSize`,`IP space of size /${rootNetmask} not big enough to allocate subnets of sizes ${netmasks.map(x=>`/${x}`)}`);return ret}function nextMultiple(current,multiple){return Math.ceil(current/multiple)*multiple}
|
||||
Reference in New Issue
Block a user