v1.0.80: drop svcOperationId from preview POST — API now populates actual paramValue
This commit is contained in:
+1
-1
@@ -6,7 +6,7 @@ from routes.main import bp as main_bp
|
||||
from routes.api import bp as api_bp
|
||||
from routes.api_test import bp as api_test_bp
|
||||
|
||||
VERSION = "1.0.79"
|
||||
VERSION = "1.0.80"
|
||||
|
||||
app = Flask(__name__, template_folder="templates", static_folder="static")
|
||||
app.config["NUBES_API_ENDPOINT"] = os.getenv("NUBES_API_ENDPOINT", "https://lk-api-gateway-dev.ngcloud.ru/api/v1/svc")
|
||||
|
||||
@@ -136,8 +136,9 @@ def api_params(op_id):
|
||||
|
||||
if instance_uid and op_name:
|
||||
_log(f"[api_params] PREVIEW branch: creating operation for instance={instance_uid}")
|
||||
# Создать pending-операцию чтобы прочитать ТЕКУЩИЕ значения параметров инстанса
|
||||
op_payload = {"instanceUid": instance_uid, "svcOperationId": op_id, "operation": op_name}
|
||||
# ВАЖНО: без svcOperationId — API сам подтянет текущие paramValue из инстанса
|
||||
# (с svcOperationId — возвращает None для всех paramValue)
|
||||
op_payload = {"instanceUid": instance_uid, "operation": op_name}
|
||||
op_resp = _client().post("/instanceOperations", op_payload)
|
||||
preview_op_uid = _find_uid(op_resp) or _uid_from_location(op_resp.get("_location", ""))
|
||||
_log(f"[api_params] preview_op_uid={preview_op_uid!r}")
|
||||
|
||||
Reference in New Issue
Block a user