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

Commit

Permalink
merged staging
Browse files Browse the repository at this point in the history
  • Loading branch information
dweinholz committed Jan 18, 2022
2 parents ef4590a + 2061112 commit 69dbe4f
Show file tree
Hide file tree
Showing 11 changed files with 47 additions and 87 deletions.
3 changes: 0 additions & 3 deletions .env.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Client and Bibigrid
CLOUD_PORTAL_CLIENT_TAG=0.1.0-beta.0.15.1
BIBIGRID_TAG=bibigrid-rest-2.3
FORC_API_KEY=


Expand All @@ -14,7 +12,6 @@ OS_PROJECT_DOMAIN_ID=
OS_PASSWORD=

# Filebeat
FILEBEAT_TAG=7.15.2
ELASTIC_USER=
ELASTIC_PASSWORD=
HOST=portal-dev.denbi.de
Expand Down
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@v3.11.0
uses: peter-evans/create-pull-request@v3.12.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: fix(Linting):blacked code
Expand Down
43 changes: 0 additions & 43 deletions .github/workflows/update_docker_tags.yml

This file was deleted.

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.0-buster
FROM python:3.10.1-buster
RUN apt-get update -y
RUN apt-get install -y build-essential
WORKDIR /code
Expand Down
3 changes: 0 additions & 3 deletions Dockerfile.update

This file was deleted.

34 changes: 33 additions & 1 deletion VirtualMachineService/VirtualMachineHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,8 @@ def check_server_task_state(self, openstack_id):
return "No active task"

def get_image(self, image):
image = self.conn.compute.find_image(image)
image = self.conn.get_image(name_or_id=image)

if image is None:
LOG.exception("Image {0} not found!".format(image))
raise imageNotFoundException(Reason=("Image {0} not found".format(image)))
Expand Down Expand Up @@ -2073,11 +2074,42 @@ def get_clusters_info(self):
infos = response.json()["info"]
return infos

def get_active_image_by_os_version(self, os_version, os_distro):
LOG.info(f"Get active Image by os-version: {os_version}")
images = self.conn.list_images()
for image in images:
metadata = image["metadata"]
image_os_version = metadata.get("os_version", None)
image_os_distro = metadata.get("os_distro", None)
if os_version == image_os_version and image.status == "active":
if os_distro and os_distro == image_os_distro:
return image
elif os_distro is None:
return image
return None

def scale_up_cluster(
self, cluster_id, image, flavor, count, names, start_idx, batch_index
):
cluster_info = self.get_cluster_info(cluster_id=cluster_id)
image = self.get_image(image=image)
if not image:
raise imageNotFoundException(Reason=(f"No Image {image} found!"))
if image and image.status != "active":
LOG.info(image.keys())
metadata = image.get("metadata", None)
image_os_version = metadata.get("os_version", None)
image_os_distro = metadata.get("os_distro", None)
image = self.get_active_image_by_os_version(
os_version=image_os_version, os_distro=image_os_distro
)
if not image:
raise imageNotFoundException(
Reason=(
f"No active Image with os_version {image_os_version} found!"
)
)

flavor = self.get_flavor(flavor=flavor)
network = self.get_network()
openstack_ids = []
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.bibigrid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ services:

# filebeat
filebeat:
image: docker.elastic.co/beats/filebeat:7.16.1
image: docker.elastic.co/beats/filebeat:7.16.3
env_file:
- .env
volumes:
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ services:
# filebeat
filebeat:
container_name: client_filebeat
image: docker.elastic.co/beats/filebeat:7.16.1
image: docker.elastic.co/beats/filebeat:7.16.3
env_file:
- .env
volumes:
Expand Down
4 changes: 4 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,13 @@
"addLabels": ["pin"]
}
],
<<<<<<< HEAD
"vulnerabilityAlerts": {
"labels": ["security"]
},
=======

>>>>>>> staging
"baseBranches": ["dev"],
"reviewers": ["team:portal-dev"],
"labels": ["dependencies"],
Expand Down
12 changes: 6 additions & 6 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
setuptools==59.6.0
setuptools==60.5.0
thrift==0.15.0
python-keystoneclient
openstacksdk ==0.61.0
deprecated == 1.2.13
Click==8.0.3
ansible==5.0.1
ansible==5.2.0
flake8==4.0.1
ruamel.yaml<0.18.0
paramiko==2.8.1
paramiko==2.9.2
ruamel.yaml==0.17.20
pyvim==3.0.2
redis==4.0.2
requests==2.26.0
redis==4.1.1
requests==2.27.1
pyyaml==6.0
27 changes: 0 additions & 27 deletions update_env_by_dockerfile.py

This file was deleted.

0 comments on commit 69dbe4f

Please sign in to comment.