const mongoose = require('mongoose'); async function updateSubnets() { await mongoose.connect('mongodb://backone_inspect:backone_inspect@mongodb.prod.proit.id:27017/backone_inspect_0'); const db = mongoose.connection.db; await db.collection('agent_registry').updateOne( { uuid: 'F6-2V-DT-8A' }, { $set: { allowed_subnets: ['10.21', '192.168'] } } ); await db.collection('agent_registry').updateOne( { uuid: '8A-V3-PB-85' }, { $set: { allowed_subnets: ['10.6'] } } ); console.log('Subnets updated successfully.'); process.exit(0); } updateSubnets().catch(e => { console.error(e); process.exit(1); });