const util = require("./util.js");
if (!util.checkParams(["account-uuid", "site-name", "street", "zipCode", "city", "countryCode"])) {
return;
};
const args = process.argv;
const lmcApi = util.getApi(args[2]);
const siteName = args[3];
lmcApi.fetch(`/cloud-service-devices/accounts/${lmcApi.accountId}/sites`, "POST",
{
name: siteName,
address: {
street: args[4],
zipCode: args[5],
city: args[6],
countryCode: args[7]
}
})
.then(json => {
console.log("ID: " + json.id);
console.log("SubnetID: " + json.subnetGroupId)
});