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 Sep 22, 2020
2 parents ab17c36 + 4cd1562 commit 9f1f846
Show file tree
Hide file tree
Showing 5 changed files with 2,272 additions and 421 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Publish Docker
on:
push:
branches:
- 'dev'
- 'staging'
jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -19,4 +19,4 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
dockerfile: Dockerfile
tags: "dev"
tags: "staging"
36 changes: 20 additions & 16 deletions VirtualMachineService/VirtualMachineHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,10 @@ def keyboard_interrupt_handler_playbooks(self):

def create_connection(self):
"""
Create connection to OpenStack.
Create connection to OpenStack.
:return: OpenStack connection instance
"""
:return: OpenStack connection instance
"""
try:

conn = connection.Connection(
Expand All @@ -136,10 +136,10 @@ def create_connection(self):

def __init__(self, config):
"""
Initialize the handler.
Initialize the handler.
Read all config variables and creates a connection to OpenStack.
"""
Read all config variables and creates a connection to OpenStack.
"""

# connection to redis. Uses a pool with 10 connections.
self.pool = redis.ConnectionPool(host="redis", port=6379)
Expand Down Expand Up @@ -213,12 +213,12 @@ def __init__(self, config):
@deprecated(version="1.0.0", reason="Not supported at the moment")
def setUserPassword(self, user, password):
"""
Set the password of a user.
Set the password of a user.
:param user: Elixir-Id of the user which wants to set a password
:param password: The new password.
:return: The new password
"""
:param user: Elixir-Id of the user which wants to set a password
:param password: The new password.
:return: The new password
"""
if str(self.SET_PASSWORD) == "True":
try:
auth = v3.Password(
Expand Down Expand Up @@ -492,7 +492,11 @@ def openstack_flav_to_thrift_flav(self, flavor):
except Exception as e:
LOG.exception(e)
flav = Flavor(
vcpus=None, ram=None, disk=None, name=None, openstack_id=None,
vcpus=None,
ram=None,
disk=None,
name=None,
openstack_id=None,
)
return flav

Expand Down Expand Up @@ -1851,11 +1855,11 @@ def get_servers_by_bibigrid_id(self, bibigrid_id):

def get_vm_ports(self, openstack_id):
"""
Get Ports of the sever.
Get Ports of the sever.
:param openstack_id: Id of the server
:return: {'PORT': port, 'UDP':start_port}
"""
:param openstack_id: Id of the server
:return: {'PORT': port, 'UDP':start_port}
"""
LOG.info("Get IP and PORT for server {0}".format(openstack_id))
server = self.get_server(openstack_id)
server_base = server.fixed_ip.split(".")[-1]
Expand Down
Loading

0 comments on commit 9f1f846

Please sign in to comment.