mcp-souschef 3.0.0__py3-none-any.whl → 3.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mcp_souschef-3.0.0.dist-info → mcp_souschef-3.2.0.dist-info}/METADATA +83 -380
- mcp_souschef-3.2.0.dist-info/RECORD +47 -0
- souschef/__init__.py +2 -10
- souschef/assessment.py +336 -181
- souschef/ci/common.py +1 -1
- souschef/cli.py +37 -13
- souschef/converters/playbook.py +119 -48
- souschef/core/__init__.py +6 -1
- souschef/core/path_utils.py +233 -19
- souschef/deployment.py +10 -3
- souschef/generators/__init__.py +13 -0
- souschef/generators/repo.py +695 -0
- souschef/parsers/attributes.py +1 -1
- souschef/parsers/habitat.py +1 -1
- souschef/parsers/inspec.py +25 -2
- souschef/parsers/metadata.py +5 -3
- souschef/parsers/recipe.py +1 -1
- souschef/parsers/resource.py +1 -1
- souschef/parsers/template.py +1 -1
- souschef/server.py +426 -188
- souschef/ui/app.py +24 -30
- souschef/ui/pages/cookbook_analysis.py +837 -163
- mcp_souschef-3.0.0.dist-info/RECORD +0 -46
- souschef/converters/cookbook_specific.py.backup +0 -109
- {mcp_souschef-3.0.0.dist-info → mcp_souschef-3.2.0.dist-info}/WHEEL +0 -0
- {mcp_souschef-3.0.0.dist-info → mcp_souschef-3.2.0.dist-info}/entry_points.txt +0 -0
- {mcp_souschef-3.0.0.dist-info → mcp_souschef-3.2.0.dist-info}/licenses/LICENSE +0 -0
souschef/deployment.py
CHANGED
|
@@ -10,6 +10,7 @@ import json
|
|
|
10
10
|
import re
|
|
11
11
|
from pathlib import Path
|
|
12
12
|
from typing import Any
|
|
13
|
+
from urllib.parse import urlparse
|
|
13
14
|
|
|
14
15
|
from souschef.core.constants import (
|
|
15
16
|
CHEF_RECIPE_PREFIX,
|
|
@@ -258,10 +259,11 @@ def generate_awx_inventory_source_from_chef(
|
|
|
258
259
|
"(e.g., https://chef.example.com)"
|
|
259
260
|
)
|
|
260
261
|
|
|
261
|
-
|
|
262
|
+
parsed_url = urlparse(chef_server_url)
|
|
263
|
+
if parsed_url.scheme != "https" or not parsed_url.netloc:
|
|
262
264
|
return (
|
|
263
265
|
f"Error: Invalid Chef server URL: {chef_server_url}\n\n"
|
|
264
|
-
"Suggestion: URL must use HTTPS protocol
|
|
266
|
+
"Suggestion: URL must use HTTPS protocol with a valid host "
|
|
265
267
|
"(e.g., https://chef.example.com)"
|
|
266
268
|
)
|
|
267
269
|
|
|
@@ -983,7 +985,12 @@ def main():
|
|
|
983
985
|
# Chef server configuration
|
|
984
986
|
chef_server_url = os.environ.get('CHEF_SERVER_URL', '{chef_server_url}')
|
|
985
987
|
client_name = os.environ.get('CHEF_NODE_NAME', 'admin')
|
|
986
|
-
|
|
988
|
+
# Client key path should be customizable - use environment variable with
|
|
989
|
+
# home directory default instead of hardcoded /etc/chef/client.pem
|
|
990
|
+
client_key = os.environ.get(
|
|
991
|
+
'CHEF_CLIENT_KEY',
|
|
992
|
+
os.path.expanduser('~/.chef/client.pem')
|
|
993
|
+
)
|
|
987
994
|
|
|
988
995
|
# Initialize Chef API
|
|
989
996
|
try:
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"""Ansible artifact generators."""
|
|
2
|
+
|
|
3
|
+
from souschef.generators.repo import (
|
|
4
|
+
RepoType,
|
|
5
|
+
analyse_conversion_output,
|
|
6
|
+
generate_ansible_repository,
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
__all__ = [
|
|
10
|
+
"RepoType",
|
|
11
|
+
"analyse_conversion_output",
|
|
12
|
+
"generate_ansible_repository",
|
|
13
|
+
]
|