Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'trunk' of https://github.com/apache/libcloud into libvi…
…rt/LibvirtNodeDriver_cleanup_and_tests
- Loading branch information
Showing
8 changed files
with
85 additions
and
10 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
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,22 @@ | ||
from libcloud.compute.types import Provider | ||
from libcloud.compute.providers import get_driver | ||
|
||
apikey = 'mykey' | ||
secretkey = 'mysecret' | ||
|
||
Driver = get_driver(Provider.AURORACOMPUTE) | ||
driver = Driver(key=apikey, secret=secretkey) | ||
|
||
images = driver.list_images() | ||
sizes = driver.list_sizes() | ||
|
||
# Find a Agile Offering with 2GB of Memory | ||
size = [s for s in sizes if s.ram == 2048 and s.name.startswith('Agile')][0] | ||
|
||
# Search for the Ubuntu 16.04 image | ||
image = [i for i in images if i.name == 'Ubuntu 16.04'][0] | ||
|
||
# Create the new Virtual Machine | ||
node = driver.create_node(image=image, size=size) | ||
|
||
print(node) |
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
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