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

Commit

Permalink
Merge branch 'staging'
Browse files Browse the repository at this point in the history
  • Loading branch information
vktrrdk committed Oct 26, 2022
2 parents c7d5f77 + c65263b commit b09eb9c
Show file tree
Hide file tree
Showing 8 changed files with 75 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/blacked.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Create Pull Request
if: steps.git-check.outputs.modified == 'true'
id: cpr
uses: peter-evans/create-pull-request@v4.1.4
uses: peter-evans/create-pull-request@v4.2.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: fix(Linting):blacked code
Expand Down
14 changes: 10 additions & 4 deletions VirtualMachineService/VirtualMachineHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,8 @@ def get_Images(self):
min_disk=img["min_disk"],
min_ram=img["min_ram"],
status=img["status"],
os_version=img.get("os_version", ""),
os_distro=img.get("os_distro", ""),
created_at=img["created_at"],
updated_at=img["updated_at"],
openstack_id=img["id"],
Expand Down Expand Up @@ -463,6 +465,8 @@ def prepare_image(self, img):
min_disk=img["min_disk"],
min_ram=img["min_ram"],
status=img["status"],
os_version=img.get("os_version", ""),
os_distro=img.get("os_distro", ""),
created_at=img["created_at"],
updated_at=img["updated_at"],
openstack_id=img["id"],
Expand Down Expand Up @@ -551,6 +555,8 @@ def get_Image_with_Tag(self, id):
min_disk=img["min_disk"],
min_ram=img["min_ram"],
status=img["status"],
os_version=img.get("os_version", ""),
os_distro=img.get("os_distro", ""),
created_at=img["created_at"],
updated_at=img["updated_at"],
openstack_id=img["id"],
Expand Down Expand Up @@ -599,6 +605,8 @@ def get_Images_by_filter(self, filter_list):
status=img["status"],
created_at=img["created_at"],
updated_at=img["updated_at"],
os_version=img.get("os_version", ""),
os_distro=img.get("os_distro", ""),
openstack_id=img["id"],
description=description,
tag=tags,
Expand Down Expand Up @@ -2185,15 +2193,13 @@ def create_snapshot(self, openstack_id, name, elixir_id, base_tags, description)
)
)

server=self.conn.get_server_by_id(openstack_id)
server = self.conn.get_server_by_id(openstack_id)
LOG.info(server)
if server is None:
LOG.exception(f"Instance {openstack_id} not found")
raise serverNotFoundException
try:
snapshot_munch = self.conn.create_image_snapshot(
server=server, name=name
)
snapshot_munch = self.conn.create_image_snapshot(server=server, name=name)
except ConflictException as e:
LOG.exception(f"Create snapshot {openstack_id} error: {e}")

Expand Down
2 changes: 1 addition & 1 deletion VirtualMachineService/VirtualMachineService-remote
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
# Autogenerated by Thrift Compiler (0.15.0)
# Autogenerated by Thrift Compiler (0.16.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
Expand Down
2 changes: 1 addition & 1 deletion 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/constants.py

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

56 changes: 55 additions & 1 deletion VirtualMachineService/ttypes.py

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

4 changes: 4 additions & 0 deletions portal_client.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ struct Image{

/** If the Image is a snapshot*/
10:optional bool is_snapshot

11:optional string os_version
12:optional string os_distro

}
/**
* This Struct defines a VirtualMachine.
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
setuptools==65.4.1
setuptools==65.5.0
thrift==0.16.0
python-keystoneclient==5.0.1
openstacksdk ==0.101.0
openstacksdk ==0.102.0
deprecated == 1.2.13
ansible==6.5.0
Click==8.1.3
Expand Down

0 comments on commit b09eb9c

Please sign in to comment.