Officially deprecate os-cloud-config
We can officially deprecate os-cloud-config in the Ocata release of TripleO as all of the remaining uses are now also deprecated. We can plan to remove the code in Pike. Change-Id: Ifd477fe379865752110aebe0aa60aa090f43d7eb
This commit is contained in:
parent
60ef21f450
commit
8cbab5ceee
|
@ -1,3 +1,8 @@
|
|||
.. warning::
|
||||
|
||||
os-cloud-config is DEPRECATED in the Ocata release and will be removed in
|
||||
Pike.
|
||||
|
||||
========================
|
||||
Team and repository tags
|
||||
========================
|
||||
|
|
|
@ -6,6 +6,11 @@
|
|||
Welcome to os-cloud-config's documentation!
|
||||
========================================================
|
||||
|
||||
.. warning::
|
||||
|
||||
os-cloud-config is DEPRECATED in the Ocata release and will be removed in
|
||||
Pike.
|
||||
|
||||
Contents:
|
||||
|
||||
.. toctree::
|
||||
|
|
|
@ -12,7 +12,29 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import logging
|
||||
import sys
|
||||
|
||||
import pbr.version
|
||||
|
||||
|
||||
__version__ = pbr.version.VersionInfo('os_cloud_config').version_string()
|
||||
|
||||
|
||||
def configure_logging(args=None):
|
||||
if args and args.log_config:
|
||||
logging.config.fileConfig(args.log_config,
|
||||
disable_existing_loggers=False)
|
||||
else:
|
||||
format = '%(asctime)s - %(name)s - %(levelname)s - %(message)s'
|
||||
date_format = '%Y-%m-%d %H:%M:%S'
|
||||
log_level = logging.DEBUG if args and args.debug else logging.INFO
|
||||
logging.basicConfig(datefmt=date_format,
|
||||
format=format,
|
||||
level=log_level,
|
||||
stream=sys.stdout)
|
||||
|
||||
configure_logging()
|
||||
LOG = logging.getLogger(__name__)
|
||||
LOG.warning("os-cloud-config is DEPRECATED in the Ocata release and will "
|
||||
"be removed in Pike.")
|
||||
|
|
|
@ -13,11 +13,9 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import logging
|
||||
import logging.config
|
||||
import os
|
||||
import sys
|
||||
|
||||
import os_cloud_config
|
||||
from os_cloud_config import exception
|
||||
|
||||
|
||||
|
@ -42,14 +40,4 @@ def _add_logging_arguments(parser):
|
|||
|
||||
|
||||
def _configure_logging(args):
|
||||
if args.log_config:
|
||||
logging.config.fileConfig(args.log_config,
|
||||
disable_existing_loggers=False)
|
||||
else:
|
||||
format = '%(asctime)s - %(name)s - %(levelname)s - %(message)s'
|
||||
date_format = '%Y-%m-%d %H:%M:%S'
|
||||
log_level = logging.DEBUG if args.debug else logging.INFO
|
||||
logging.basicConfig(datefmt=date_format,
|
||||
format=format,
|
||||
level=log_level,
|
||||
stream=sys.stdout)
|
||||
os_cloud_config.configure_logging(args)
|
||||
|
|
Loading…
Reference in New Issue