-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #172 from partik03/linode_parser
Linode parser
- Loading branch information
Showing
3 changed files
with
423 additions
and
352 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,29 @@ | ||
import * as fs from "fs"; | ||
import * as yaml from "js-yaml"; | ||
import * as fs from 'fs'; | ||
import * as yaml from 'js-yaml'; | ||
|
||
import { generateAWSClass } from "./generators/aws/generator"; | ||
import { generateAzureClass } from "./generators/azure/generator"; | ||
import { generateDOClass } from "./generators/do/generator"; | ||
import { generateGCPClass } from "./generators/googleCloud/generator"; | ||
import { generateAWSClass } from './generators/aws/generator'; | ||
import { generateAzureClass } from './generators/azure/generator'; | ||
import { generateDOClass } from './generators/do/generator'; | ||
import { generateGCPClass } from './generators/googleCloud/generator'; | ||
|
||
try { | ||
const services = yaml.safeLoad(fs.readFileSync("node-cloud.yml", "utf8")); | ||
Object.keys(services).map((service, index) => { | ||
Object.keys(services[service]).map((provider, index1) => { | ||
if (provider === "Azure") { | ||
generateAzureClass(services[service][provider], service); | ||
} else if (provider === "AWS") { | ||
generateAWSClass(services[service][provider], service); | ||
} else if (provider === "GCP") { | ||
generateGCPClass(services[service][provider], service); | ||
} else if (provider == "DO") { | ||
generateDOClass(services[service][provider], service); | ||
} | ||
}); | ||
}); | ||
const services = yaml.safeLoad(fs.readFileSync('node-cloud.yml', 'utf8')); | ||
Object.keys(services).map((service, index) => { | ||
Object.keys(services[service]).map((provider, index1) => { | ||
if (provider === "Azure") { | ||
generateAzureClass(services[service][provider], service); | ||
} else if (provider === "AWS") { | ||
generateAWSClass(services[service][provider], service); | ||
} else if (provider === "GCP") { | ||
generateGCPClass(services[service][provider], service); | ||
} else if (provider == "DO") { | ||
generateDOClass(services[service][provider], service); | ||
} | ||
if (provider == 'Linode') { | ||
generateDOClass(services[service][provider], service); | ||
} | ||
}); | ||
}); | ||
} catch (error) { | ||
console.error("Error : ", error); | ||
console.error('Error : ', error); | ||
} |
Oops, something went wrong.