forked from pool/python-azure-agent
+ Remove config manipulation from image building + Set up a config for SLE-Micro + Makes deafult upstream config available - Update to 2.9.1.1 (bsc#1217301, bsc#1217302) + Update remove-mock.patch + Download certificates when goal state source is fast track #2761 + Increase the max number of extension events by 20% #2785 + Remove version suffix from extension slice #2782 + Support int type for eventPid and eventTid fields #2786 + Improve log for swap counter not found #2789 + Remove cgroup files during deprovisioning #2790 + Log VM architecture in heartbeat telemetry for arm64 adoption monitoring #2818 + Enforce memory usage for agent #2671 + Use common download logic for agent downloads #2682 + Implement Fedora distro #2642 + Report message in handler heartbeat #2688 + Remove dependency on pathlib from makepkg #2717 + Do not fetch extensions goal state in log collector #2713 + Update log collector unit file to remove memory limit #2757 + Fix bug in get_dhcp_pid (CoreOS) #2784 + Fetch full distro version for mariner #2773 From 2.9.04 + Resource Governance on extensions (CPU monitoring and enforcing & Memory monitoring) #2632 #2581 #2555 + Agent resource governance #2597 #2591 #2546 + monitor system-wide memory metrics (#2610) + Additional telemetry for goal state (#2675) + HostGAPlugin usage improvements #2662 #2673 #2655 #2651 OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/python-azure-agent?expand=0&rev=97
161 lines
5.5 KiB
Diff
161 lines
5.5 KiB
Diff
Index: WALinuxAgent-2.9.1.1/tests/common/dhcp/test_dhcp.py
|
|
===================================================================
|
|
--- WALinuxAgent-2.9.1.1.orig/tests/common/dhcp/test_dhcp.py
|
|
+++ WALinuxAgent-2.9.1.1/tests/common/dhcp/test_dhcp.py
|
|
@@ -15,7 +15,10 @@
|
|
# Requires Python 2.6+ and Openssl 1.0+
|
|
#
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
import azurelinuxagent.common.dhcp as dhcp
|
|
import azurelinuxagent.common.osutil.default as osutil
|
|
from tests.tools import AgentTestCase, open_patch, patch
|
|
Index: WALinuxAgent-2.9.1.1/tests/common/osutil/test_default.py
|
|
===================================================================
|
|
--- WALinuxAgent-2.9.1.1.orig/tests/common/osutil/test_default.py
|
|
+++ WALinuxAgent-2.9.1.1/tests/common/osutil/test_default.py
|
|
@@ -22,7 +22,10 @@ import subprocess
|
|
import tempfile
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
import azurelinuxagent.common.conf as conf
|
|
import azurelinuxagent.common.osutil.default as osutil
|
|
Index: WALinuxAgent-2.9.1.1/tests/common/test_event.py
|
|
===================================================================
|
|
--- WALinuxAgent-2.9.1.1.orig/tests/common/test_event.py
|
|
+++ WALinuxAgent-2.9.1.1/tests/common/test_event.py
|
|
@@ -26,7 +26,10 @@ import threading
|
|
import xml.dom
|
|
from datetime import datetime, timedelta
|
|
|
|
-from mock import MagicMock
|
|
+try:
|
|
+ from unittest.mock import MagicMock
|
|
+except ImportError:
|
|
+ from mock import MagicMock
|
|
|
|
from azurelinuxagent.common.utils import textutil, fileutil
|
|
from azurelinuxagent.common import event, logger
|
|
Index: WALinuxAgent-2.9.1.1/tests/common/test_version.py
|
|
===================================================================
|
|
--- WALinuxAgent-2.9.1.1.orig/tests/common/test_version.py
|
|
+++ WALinuxAgent-2.9.1.1/tests/common/test_version.py
|
|
@@ -20,7 +20,10 @@ from __future__ import print_function
|
|
import os
|
|
import textwrap
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
import azurelinuxagent.common.conf as conf
|
|
from azurelinuxagent.common.future import ustr
|
|
Index: WALinuxAgent-2.9.1.1/tests/distro/test_scvmm.py
|
|
===================================================================
|
|
--- WALinuxAgent-2.9.1.1.orig/tests/distro/test_scvmm.py
|
|
+++ WALinuxAgent-2.9.1.1/tests/distro/test_scvmm.py
|
|
@@ -20,7 +20,10 @@
|
|
import os
|
|
import unittest
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
|
|
import azurelinuxagent.daemon.scvmm as scvmm
|
|
from azurelinuxagent.common import conf
|
|
Index: WALinuxAgent-2.9.1.1/tests/ga/mocks.py
|
|
===================================================================
|
|
--- WALinuxAgent-2.9.1.1.orig/tests/ga/mocks.py
|
|
+++ WALinuxAgent-2.9.1.1/tests/ga/mocks.py
|
|
@@ -17,7 +17,10 @@
|
|
|
|
import contextlib
|
|
|
|
-from mock import PropertyMock
|
|
+try:
|
|
+ from unittest.mock import PropertyMock
|
|
+except ImportError:
|
|
+ from mock import PropertyMock
|
|
from azurelinuxagent.ga.exthandlers import ExtHandlersHandler
|
|
from azurelinuxagent.ga.remoteaccess import RemoteAccessHandler
|
|
from azurelinuxagent.ga.update import UpdateHandler, get_update_handler
|
|
Index: WALinuxAgent-2.9.1.1/tests/ga/test_collect_telemetry_events.py
|
|
===================================================================
|
|
--- WALinuxAgent-2.9.1.1.orig/tests/ga/test_collect_telemetry_events.py
|
|
+++ WALinuxAgent-2.9.1.1/tests/ga/test_collect_telemetry_events.py
|
|
@@ -26,7 +26,10 @@ import string
|
|
import uuid
|
|
from collections import defaultdict
|
|
|
|
-from mock import patch, MagicMock
|
|
+try:
|
|
+ from unittest.mock import patch, MagicMock
|
|
+except ImportError:
|
|
+ from mock import patch, MagicMock
|
|
|
|
from azurelinuxagent.common import conf
|
|
from azurelinuxagent.common.event import EVENTS_DIRECTORY
|
|
Index: WALinuxAgent-2.9.1.1/tests/ga/test_remoteaccess_handler.py
|
|
===================================================================
|
|
--- WALinuxAgent-2.9.1.1.orig/tests/ga/test_remoteaccess_handler.py
|
|
+++ WALinuxAgent-2.9.1.1/tests/ga/test_remoteaccess_handler.py
|
|
@@ -16,7 +16,10 @@
|
|
#
|
|
from datetime import timedelta, datetime
|
|
|
|
-from mock import Mock, MagicMock
|
|
+try:
|
|
+ from unittest.mock import Mock, MagicMock
|
|
+except ImportError:
|
|
+ from mock import Mock, MagicMock
|
|
from azurelinuxagent.common.osutil.default import DefaultOSUtil
|
|
from azurelinuxagent.common.protocol.goal_state import RemoteAccess
|
|
from azurelinuxagent.common.protocol.util import ProtocolUtil
|
|
Index: WALinuxAgent-2.9.1.1/tests/ga/test_send_telemetry_events.py
|
|
===================================================================
|
|
--- WALinuxAgent-2.9.1.1.orig/tests/ga/test_send_telemetry_events.py
|
|
+++ WALinuxAgent-2.9.1.1/tests/ga/test_send_telemetry_events.py
|
|
@@ -24,7 +24,10 @@ import time
|
|
import uuid
|
|
from datetime import datetime, timedelta
|
|
|
|
-from mock import MagicMock, Mock, patch, PropertyMock
|
|
+try:
|
|
+ from unittest.mock import MagicMock, Mock, patch, PropertyMock
|
|
+except ImportError:
|
|
+ from mock import MagicMock, Mock, patch, PropertyMock
|
|
|
|
from azurelinuxagent.common import logger
|
|
from azurelinuxagent.common.datacontract import get_properties
|
|
Index: WALinuxAgent-2.9.1.1/tests/utils/test_network_util.py
|
|
===================================================================
|
|
--- WALinuxAgent-2.9.1.1.orig/tests/utils/test_network_util.py
|
|
+++ WALinuxAgent-2.9.1.1/tests/utils/test_network_util.py
|
|
@@ -16,7 +16,10 @@
|
|
#
|
|
import subprocess
|
|
|
|
-from mock.mock import patch
|
|
+try:
|
|
+ from unittest.mock import patch
|
|
+except ImportError:
|
|
+ from mock import patch
|
|
|
|
import azurelinuxagent.common.utils.networkutil as networkutil
|
|
from tests.tools import AgentTestCase
|