Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cloud-computing-msc-ai-examples
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sebastian Rieger
cloud-computing-msc-ai-examples
Commits
01937c66
Commit
01937c66
authored
Apr 10, 2018
by
Sebastian Rieger
Browse files
Options
Downloads
Patches
Plain Diff
changed image search for ubuntu image
parent
ff8ab740
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
demo1-getting-started.py
+9
-8
9 additions, 8 deletions
demo1-getting-started.py
with
9 additions
and
8 deletions
demo1-getting-started.py
+
9
−
8
View file @
01937c66
...
...
@@ -5,16 +5,18 @@ from libcloud.compute.providers import get_driver
from
libcloud.compute.types
import
Provider
auth_username
=
'
fdai109
'
auth_url
=
'
https://
192.168.72.40
:5000
'
auth_url
=
'
https://
private-cloud2.informatik.hs-fulda.de
:5000
'
project_name
=
'
ai-netlab-pro
'
region_name
=
'
RegionOne
'
domain_name
=
"
hsfulda
"
ubuntu_image_name
=
"
Ubuntu 14.04 - Trusty Tahr - 64-bit - Cloud Based Image
"
def
main
():
print
(
auth_username
)
auth_password
=
getpass
.
getpass
(
"
Enter your OpenStack password:
"
)
libcloud
.
security
.
VERIFY_SSL_CERT
=
False
#
libcloud.security.VERIFY_SSL_CERT = False
provider
=
get_driver
(
Provider
.
OPENSTACK
)
conn
=
provider
(
auth_username
,
...
...
@@ -26,17 +28,16 @@ def main():
ex_domain_name
=
domain_name
)
images
=
conn
.
list_images
()
for
image
in
images
:
print
(
image
)
image
=
''
for
img
in
images
:
if
img
.
name
==
ubuntu_image_name
:
image
=
img
print
(
img
)
flavors
=
conn
.
list_sizes
()
for
flavor
in
flavors
:
print
(
flavor
)
image_id
=
'
95718fad-2b33-469c-a256-15888f461f66
'
image
=
conn
.
get_image
(
image_id
)
print
(
image
)
flavor_id
=
'
2
'
flavor
=
conn
.
ex_get_size
(
flavor_id
)
print
(
flavor
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment