Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
with:
python-version: ${{ matrix.python_version }}
- name: Install uv
uses: astral-sh/setup-uv@v7
uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867

- name: Install OS / deb dependencies
run: |
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
with:
python-version: ${{ matrix.python_version }}
- name: Install uv
uses: astral-sh/setup-uv@v7
uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867

- name: Install OS / deb dependencies
run: |
Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
with:
python-version: ${{ matrix.python_version }}
- name: Install uv
uses: astral-sh/setup-uv@v7
uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867

- name: Install OS / deb dependencies
run: |
Expand Down Expand Up @@ -140,7 +140,7 @@ jobs:
with:
python-version: ${{ matrix.python_version }}
- name: Install uv
uses: astral-sh/setup-uv@v7
uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867

- name: Install OS / deb dependencies
run: |
Expand Down Expand Up @@ -188,7 +188,7 @@ jobs:
with:
python-version: ${{ matrix.python_version }}
- name: Install uv
uses: astral-sh/setup-uv@v7
uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867
- name: Install OS / deb dependencies
run: |
sudo DEBIAN_FRONTEND=noninteractive apt-get update
Expand Down Expand Up @@ -287,7 +287,7 @@ jobs:
with:
python-version: ${{ matrix.python_version }}
- name: Install uv
uses: astral-sh/setup-uv@v7
uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867

- name: Install OS / deb dependencies
run: |
Expand Down Expand Up @@ -360,7 +360,7 @@ jobs:
with:
python-version: ${{ matrix.python_version }}
- name: Install uv
uses: astral-sh/setup-uv@v7
uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867

- name: Install OS / deb dependencies
run: |
Expand Down Expand Up @@ -399,7 +399,7 @@ jobs:
with:
python-version: ${{ matrix.python_version }}
- name: Install uv
uses: astral-sh/setup-uv@v7
uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867

- name: Print Environment Info
run: printenv | sort
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish_dev_artifact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
with:
python-version: "3.10"
- name: Install uv
uses: astral-sh/setup-uv@v7
uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867

- name: Print Environment Info
run: printenv | sort
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish_pricing_to_s3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
with:
python-version: ${{ matrix.python_version }}
- name: Install uv
uses: astral-sh/setup-uv@v7
uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867

- name: Print Environment Info
run: printenv | sort
Expand Down
1 change: 1 addition & 0 deletions libcloud/common/abiquo.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

Common utilities needed by the :class:`AbiquoNodeDriver`.
"""

import base64

from libcloud.utils.py3 import b, httplib, urlparse
Expand Down
8 changes: 4 additions & 4 deletions libcloud/common/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ class Connection:
port = 443
timeout = None # type: Optional[Union[int, float]]
secure = 1
driver = None # type: Type[BaseDriver]
driver = None # type: Type[BaseDriver]
action = None
cache_busting = False
backoff = None
Expand Down Expand Up @@ -410,7 +410,7 @@ def reset_context(self):
def _tuple_from_url(self, url):
secure = 1
port = None
(scheme, netloc, request_path, param, query, fragment) = urlparse.urlparse(url)
scheme, netloc, request_path, param, query, fragment = urlparse.urlparse(url)

if scheme not in ["http", "https"]:
raise LibcloudError("Invalid scheme: {} in url {}".format(scheme, url))
Expand Down Expand Up @@ -450,9 +450,9 @@ def connect(self, host=None, port=None, base_url=None, **kwargs):
secure = self.secure

if getattr(self, "base_url", None) and base_url is None:
(host, port, secure, request_path) = self._tuple_from_url(getattr(self, "base_url"))
host, port, secure, request_path = self._tuple_from_url(getattr(self, "base_url"))
elif base_url is not None:
(host, port, secure, request_path) = self._tuple_from_url(base_url)
host, port, secure, request_path = self._tuple_from_url(base_url)
else:
host = host or self.host
port = port or self.port
Expand Down
1 change: 1 addition & 0 deletions libcloud/common/dimensiondata.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"""
Dimension Data Common Components
"""

from time import sleep
from base64 import b64encode

Expand Down
9 changes: 4 additions & 5 deletions libcloud/common/google.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
Please remember to secure your keys and access tokens.
"""


import os
import sys
import time
Expand Down Expand Up @@ -262,7 +261,7 @@ def parse_body(self):
if json_error:
raise JsonParseError(body, self.status, None)
elif "error" in body:
(code, message) = self._get_error(body)
code, message = self._get_error(body)
if code == "QUOTA_EXCEEDED":
raise QuotaExceededError(message, self.status, code)
elif code == "RESOURCE_ALREADY_EXISTS":
Expand All @@ -278,23 +277,23 @@ def parse_body(self):

elif self.status == httplib.NOT_FOUND:
if (not json_error) and ("error" in body):
(code, message) = self._get_error(body)
code, message = self._get_error(body)
else:
message = body
code = None
raise ResourceNotFoundError(message, self.status, code)

elif self.status == httplib.BAD_REQUEST:
if (not json_error) and ("error" in body):
(code, message) = self._get_error(body)
code, message = self._get_error(body)
else:
message = body
code = None
raise InvalidRequestError(message, self.status, code)

else:
if (not json_error) and ("error" in body):
(code, message) = self._get_error(body)
code, message = self._get_error(body)
else:
message = body
code = None
Expand Down
2 changes: 1 addition & 1 deletion libcloud/common/openstack.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ def morph_action_hook(self, action):
def _set_up_connection_info(self, url):
prev_conn = (self.host, self.port, self.secure)
result = self._tuple_from_url(url)
(self.host, self.port, self.secure, self.request_path) = result
self.host, self.port, self.secure, self.request_path = result
new_conn = (self.host, self.port, self.secure)
if new_conn != prev_conn:
# We only call connect in case connection details have changed - this way we correctly
Expand Down
2 changes: 1 addition & 1 deletion libcloud/common/openstack_identity.py
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ def authenticated_request(
return response

def morph_action_hook(self, action):
(_, _, _, request_path) = self._tuple_from_url(self.auth_url)
_, _, _, request_path = self._tuple_from_url(self.auth_url)

if request_path == "":
# No path is provided in the auth_url, use action passed to this
Expand Down
1 change: 0 additions & 1 deletion libcloud/compute/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
Provides base classes for working with drivers
"""


import os
import re
import time
Expand Down
1 change: 0 additions & 1 deletion libcloud/compute/deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
Provides generic deployment steps for machines post boot.
"""


import os
import re
import binascii
Expand Down
6 changes: 3 additions & 3 deletions libcloud/compute/drivers/azure_arm.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,10 +439,10 @@ def get_image(self, image_id, location=None):
"""

if image_id.startswith("http"):
(storageAccount, blobContainer, blob) = _split_blob_uri(image_id)
storageAccount, blobContainer, blob = _split_blob_uri(image_id)
return AzureVhdImage(storageAccount, blobContainer, blob, self)
else:
(ex_publisher, ex_offer, ex_sku, ex_version) = image_id.split(":")
ex_publisher, ex_offer, ex_sku, ex_version = image_id.split(":")
i = self.list_images(location, ex_publisher, ex_offer, ex_sku, ex_version)
return i[0] if i else None

Expand Down Expand Up @@ -2315,7 +2315,7 @@ def ex_run_command(

def _ex_delete_old_vhd(self, resource_group, uri):
try:
(storageAccount, blobContainer, blob) = _split_blob_uri(uri)
storageAccount, blobContainer, blob = _split_blob_uri(uri)
keys = self.ex_get_storage_account_keys(resource_group, storageAccount)
blobdriver = AzureBlobsStorageDriver(
storageAccount,
Expand Down
1 change: 1 addition & 0 deletions libcloud/compute/drivers/digitalocean.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"""
DigitalOcean Driver
"""

import json
import warnings

Expand Down
1 change: 1 addition & 0 deletions libcloud/compute/drivers/dummy.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

@note: This driver is out of date
"""

import uuid
import socket
import struct
Expand Down
14 changes: 4 additions & 10 deletions libcloud/compute/drivers/ecs.py
Original file line number Diff line number Diff line change
Expand Up @@ -767,11 +767,8 @@ def ex_join_security_group(self, node, group_id=None):
raise AttributeError("group_id is required")

if node.state != NodeState.RUNNING and node.state != NodeState.STOPPED:
raise LibcloudError(
"The node state with id % s need\
be running or stopped ."
% node.id
)
raise LibcloudError("The node state with id % s need\
be running or stopped ." % node.id)

params = {
"Action": "JoinSecurityGroup",
Expand Down Expand Up @@ -799,11 +796,8 @@ def ex_leave_security_group(self, node, group_id=None):
raise AttributeError("group_id is required")

if node.state != NodeState.RUNNING and node.state != NodeState.STOPPED:
raise LibcloudError(
"The node state with id % s need\
be running or stopped ."
% node.id
)
raise LibcloudError("The node state with id % s need\
be running or stopped ." % node.id)

params = {
"Action": "LeaveSecurityGroup",
Expand Down
3 changes: 1 addition & 2 deletions libcloud/compute/drivers/equinixmetal.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,7 @@ def _list_async(driver):
result = yield from future
retval.extend(result)

return retval"""
% resource_type,
return retval""" % resource_type,
glob,
loc,
)
Expand Down
3 changes: 2 additions & 1 deletion libcloud/compute/drivers/gandi.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"""
Gandi driver for compute
"""

from datetime import datetime

from libcloud.common.gandi import (
Expand Down Expand Up @@ -321,7 +322,7 @@ def create_node(

# Call create_from helper api. Return 3 operations : disk_create,
# iface_create,vm_create
(op_disk, op_iface, op_vm) = self.connection.request(
op_disk, op_iface, op_vm = self.connection.request(
"hosting.vm.create_from", vm_spec, disk_spec, src_disk_id
).object

Expand Down
1 change: 0 additions & 1 deletion libcloud/compute/drivers/gce.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
Module for Google Compute Engine Driver.
"""


import sys
import time
import datetime
Expand Down
1 change: 1 addition & 0 deletions libcloud/compute/drivers/gig_g8.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
GiG G8 Driver

"""

import json

from libcloud.compute.base import (
Expand Down
1 change: 1 addition & 0 deletions libcloud/compute/drivers/kamatera.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"""
Kamatera node driver
"""

import json
import time
import datetime
Expand Down
1 change: 1 addition & 0 deletions libcloud/compute/drivers/kubevirt.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"""
kubevirt driver with support for nodes (vms)
"""

import copy
import json
import time
Expand Down
3 changes: 1 addition & 2 deletions libcloud/compute/drivers/linode.py
Original file line number Diff line number Diff line change
Expand Up @@ -680,8 +680,7 @@ def ex_create_volume(self, size, name, node, fs_type):
raise LinodeException(
0xFD,
"Volume size too big. Available space\
%d"
% available_space,
%d" % available_space,
)

# check filesystem type
Expand Down
1 change: 1 addition & 0 deletions libcloud/compute/drivers/nttcis.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"""
NTT CIS Driver
"""

import re
import sys

Expand Down
7 changes: 2 additions & 5 deletions libcloud/compute/drivers/openstack.py
Original file line number Diff line number Diff line change
Expand Up @@ -1259,11 +1259,8 @@ def __init__(self, id, tenant_id, name, description, driver, rules=None, extra=N
self.extra = extra or {}

def __repr__(self):
return (
"<OpenStackSecurityGroup id=%s tenant_id=%s name=%s \
description=%s>"
% (self.id, self.tenant_id, self.name, self.description)
)
return "<OpenStackSecurityGroup id={} tenant_id={} name={} \
description={}>".format(self.id, self.tenant_id, self.name, self.description)


class OpenStackSecurityGroupRule:
Expand Down
1 change: 1 addition & 0 deletions libcloud/compute/drivers/ovh.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"""
Ovh driver
"""

from libcloud.utils.py3 import httplib
from libcloud.common.ovh import API_ROOT, OvhConnection
from libcloud.compute.base import (
Expand Down
1 change: 1 addition & 0 deletions libcloud/compute/drivers/rackspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"""
Rackspace driver
"""

from libcloud.compute.base import NodeLocation, VolumeSnapshot
from libcloud.compute.types import Provider, LibcloudError, VolumeSnapshotState
from libcloud.utils.iso8601 import parse_date
Expand Down
1 change: 1 addition & 0 deletions libcloud/compute/drivers/rimuhosting.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"""
RimuHosting Driver
"""

try:
import simplejson as json
except ImportError:
Expand Down
Loading
Loading