diff options
-rw-r--r-- | cloudinit/CloudConfig/cc_ca_certs.py | 11 | ||||
-rw-r--r-- | tests/unittests/test_handler_ca_certs.py | 4 |
2 files changed, 3 insertions, 12 deletions
diff --git a/cloudinit/CloudConfig/cc_ca_certs.py b/cloudinit/CloudConfig/cc_ca_certs.py index 9d7dcf7f..ef651f8b 100644 --- a/cloudinit/CloudConfig/cc_ca_certs.py +++ b/cloudinit/CloudConfig/cc_ca_certs.py @@ -21,22 +21,13 @@ import json import StringIO import ConfigParser import cloudinit.CloudConfig as cc -from cloudinit.util import write_file, get_cfg_option_list_or_str +from cloudinit.util import write_file, get_cfg_option_list_or_str, delete_dir_contents CA_CERT_PATH = "/usr/share/ca-certificates/" CA_CERT_FILENAME = "cloud-init-ca-certs.crt" CA_CERT_CONFIG = "/etc/ca-certificates.conf" CA_CERT_SYSTEM_PATH = "/etc/ssl/certs/" -def delete_dir_contents(dirname): - """ - Delete all the contents of the directory specified by C{dirname} without - deleting the directory itself. - - @param dirname: The directory whose contents should be deleted. - """ - raise NotImplementedError() - def update_ca_certs(): """ Updates the CA certificate cache on the current machine. diff --git a/tests/unittests/test_handler_ca_certs.py b/tests/unittests/test_handler_ca_certs.py index d8b98a6b..92460088 100644 --- a/tests/unittests/test_handler_ca_certs.py +++ b/tests/unittests/test_handler_ca_certs.py @@ -1,8 +1,8 @@ from unittest import TestCase from mocker import MockerTestCase -from cloudinit.util import write_file -from cloudinit.CloudConfig.cc_ca_certs import handle, update_ca_certs, add_ca_certs, remove_default_ca_certs, delete_dir_contents +from cloudinit.util import write_file, delete_dir_contents +from cloudinit.CloudConfig.cc_ca_certs import handle, update_ca_certs, add_ca_certs, remove_default_ca_certs class TestNoConfig(MockerTestCase): |