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

Commit

Permalink
Merge pull request #1246 from deNBI/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
eKatchko authored Oct 18, 2022
2 parents f4c303f + 7f44dc5 commit a07180b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 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/[email protected].3
uses: peter-evans/[email protected].4
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: fix(Linting):blacked code
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.10.7-buster
FROM python:3.10.8-buster
RUN apt-get update -y
RUN apt-get install -y build-essential
WORKDIR /code
Expand Down
8 changes: 6 additions & 2 deletions VirtualMachineService/VirtualMachineHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,6 @@ def get_servers_by_ids(self, ids):
def check_server_task_state(self, openstack_id):
LOG.info(f"Checking Task State: {openstack_id}")
server = self.conn.get_server_by_id(openstack_id)
LOG.info(server)
if not server:
return "No server found"
task_state = server.get("task_state", None)
Expand Down Expand Up @@ -2186,9 +2185,14 @@ def create_snapshot(self, openstack_id, name, elixir_id, base_tags, description)
)
)

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=openstack_id, name=name
server=server, name=name
)
except ConflictException as e:
LOG.exception(f"Create snapshot {openstack_id} error: {e}")
Expand Down

0 comments on commit a07180b

Please sign in to comment.