-
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 #189 from partik03/final_gsoc23
Final Changes and Documentation
- Loading branch information
Showing
71 changed files
with
694 additions
and
503 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
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 |
---|---|---|
@@ -0,0 +1,70 @@ | ||
const nodeCloud = require('../../lib/'); | ||
const optionsProvider = { | ||
overrideProviders: false, | ||
}; | ||
const ncProviders = nodeCloud.getProviders(optionsProvider); | ||
|
||
const images = ncProviders.linode.images(); | ||
|
||
function createImage() { | ||
const diskId = 123; | ||
const label = 'this_is_a_label'; | ||
const description = 'A longer description of the image'; | ||
images | ||
.createImage(diskId, label, description) | ||
.then(result => { | ||
console.log('Volumes are: ', result); | ||
}) | ||
.catch(err => { | ||
console.log('Error is: ', err); | ||
}); | ||
} | ||
|
||
function updateImage() { | ||
const imageId = 123; | ||
const label = 'this_is_a_new_label'; | ||
const description = 'A new longer description of the image'; | ||
images | ||
.updateImage(imageId, label, description) | ||
.then(result => { | ||
console.log('Volumes are: ', result); | ||
}) | ||
.catch(err => { | ||
console.log('Error is: ', err); | ||
}); | ||
} | ||
|
||
function deleteImage() { | ||
const imageId = 123; | ||
images | ||
.deleteImage(details) | ||
.then(result => { | ||
console.log('Output is: ', result); | ||
}) | ||
.catch(err => { | ||
console.log('Error is: ', err); | ||
}); | ||
} | ||
|
||
function getImage() { | ||
const imageId = 1234; | ||
images | ||
.getImage(imageId) | ||
.then(result => { | ||
console.log('Output is: ', result); | ||
}) | ||
.catch(err => { | ||
console.log('Error is: ', err); | ||
}); | ||
} | ||
|
||
function listImages() { | ||
images | ||
.getImages() | ||
.then(result => { | ||
console.log('Output is: ', result); | ||
}) | ||
.catch(err => { | ||
console.log('Error is: ', err); | ||
}); | ||
} |
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 |
---|---|---|
|
@@ -9,7 +9,7 @@ const dns = ncProviders.linode.dns(); | |
// Create a DNS Domain | ||
function createDomain() { | ||
let domainCreateOptions = { | ||
domain: 'example.com', | ||
domain: 'scorelab.com', | ||
type: 'master', | ||
soa_email: '[email protected]', | ||
description: 'Example Description', | ||
|
@@ -72,7 +72,7 @@ function deleteDomain() { | |
function updateDomain() { | ||
let recordID = 3352896; | ||
let options = { | ||
domain: 'example.com', | ||
domain: 'scorelab.com', | ||
type: 'master', | ||
soa_email: '[email protected]', | ||
description: 'Example Description', | ||
|
@@ -86,7 +86,7 @@ function updateDomain() { | |
group: 'Example Display Group', | ||
tags: ['tag1', 'tag2'], | ||
}; | ||
updateDomain(recordID, options) | ||
dns.updateDomain(recordID, options) | ||
.then(result => { | ||
console.log('Output is: ', result); | ||
}) | ||
|
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
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 |
---|---|---|
@@ -0,0 +1,62 @@ | ||
const nodeCloud = require('../../lib/'); | ||
const optionsProvider = { | ||
overrideProviders: false, | ||
}; | ||
const ncProviders = nodeCloud.getProviders(optionsProvider); | ||
|
||
const objectStorage = ncProviders.linode.objectStorage(); | ||
|
||
function createBucket() { | ||
const details = { | ||
label: 'nodecloud-bucket', | ||
cluster: 'us-east-1', | ||
cors_enabled: true, | ||
}; | ||
objectStorage | ||
.create(details) | ||
.then(result => { | ||
console.log('Volumes are: ', result); | ||
}) | ||
.catch(err => { | ||
console.log('Error is: ', err); | ||
}); | ||
} | ||
|
||
function deleteBucket() { | ||
const details = { | ||
cluster: 'us-east-1', | ||
label: 'nodecloud-bucket', | ||
}; | ||
objectStorage | ||
.delete(details) | ||
.then(result => { | ||
console.log('Output is: ', result); | ||
}) | ||
.catch(err => { | ||
console.log('Error is: ', err); | ||
}); | ||
} | ||
|
||
function getBucket() { | ||
const clusterId = 'us-east-1'; | ||
const bucketName = 'nodecloud-bucket'; | ||
objectStorage | ||
.get(clusterId, bucketName) | ||
.then(result => { | ||
console.log('Output is: ', result); | ||
}) | ||
.catch(err => { | ||
console.log('Error is: ', err); | ||
}); | ||
} | ||
|
||
function listBuckets() { | ||
objectStorage | ||
.list() | ||
.then(result => { | ||
console.log('Output is: ', result); | ||
}) | ||
.catch(err => { | ||
console.log('Error is: ', err); | ||
}); | ||
} |
Oops, something went wrong.