Skip to content
This repository has been archived by the owner on May 27, 2024. It is now read-only.

Commit

Permalink
feat(Snapshot):check status (#97)
Browse files Browse the repository at this point in the history
* feat(Snapshot):check status

* updated changelog
  • Loading branch information
dweinholz authored Jan 18, 2019
1 parent 3829112 commit 1dbefe5
Show file tree
Hide file tree
Showing 8 changed files with 212 additions and 14 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
#### Features

* **Snapshot:** check status



### Features

* **PR_TEMPLATE:**
Expand Down
2 changes: 2 additions & 0 deletions VirtualMachineService/VirtualMachineHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ def get_client_version(self):
self.logger.info("Get Version of Client: {}".format(VERSION))
return str(VERSION)


def get_Images(self):
"""
Get Images.
Expand Down Expand Up @@ -649,6 +650,7 @@ def create_snapshot(self, openstack_id, name, elixir_id, base_tag):
:param base_tag: Tag with which the servers image is also tagged
:return: Id of the new Snapshot
"""
self.logger.info(base_tag)
self.logger.info(
'Create Snapshot from Instance {0} with name {1} for {2}'.format(
openstack_id, name, elixir_id))
Expand Down
7 changes: 7 additions & 0 deletions VirtualMachineService/VirtualMachineService-remote
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help':
print(' get_IP_PORT(string openstack_id)')
print(' get_Flavors()')
print(' get_Images()')
print(' Image get_Image_with_Tag(string openstack_id)')
print(' bool delete_server(string openstack_id)')
print(' add_metadata_to_server(string servername, metadata)')
print(' delete_metadata_from_server(string servername, keys)')
Expand Down Expand Up @@ -164,6 +165,12 @@ elif cmd == 'get_Images':
sys.exit(1)
pp.pprint(client.get_Images())

elif cmd == 'get_Image_with_Tag':
if len(args) != 1:
print('get_Image_with_Tag requires 1 args')
sys.exit(1)
pp.pprint(client.get_Image_with_Tag(args[0],))

elif cmd == 'delete_server':
if len(args) != 1:
print('delete_server requires 1 args')
Expand Down
196 changes: 188 additions & 8 deletions VirtualMachineService/VirtualMachineService.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion VirtualMachineService/config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ openstack_connection:
port: 9090
# Gateway Port and IP
gateway_base: 30000
gateway_ip: 172.21.40.14
gateway_ip: 172.21.40.78
# If set to True the client will use a Gateway instead of providing floating IPs for each instance.
use_gateway: True
set_password: False
Expand Down
5 changes: 1 addition & 4 deletions VirtualMachineService/constants.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions portal_client.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,12 @@ service VirtualMachineService {
*/
list<Image> get_Images()

/**
* Get an image with tag.
* Returns: Image with tag.
*/
Image get_Image_with_Tag(1:string openstack_id)


/**
* Delete server.
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
setuptools==40.4.3
thrift >= 0.10.0,<0.20.0
python-keystoneclient
openstacksdk >= 0.9.19, < 1.0.0
openstacksdk ==0.20.0
deprecated == 1.2.4
Click==7.0
flake8

0 comments on commit 1dbefe5

Please sign in to comment.