maproom 0.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.
- maproom/__init__.py +14 -0
- maproom/__main__.py +10 -0
- maproom/analyze/__init__.py +1 -0
- maproom/analyze/accel_families.py +45 -0
- maproom/analyze/account_azure_activity.py +260 -0
- maproom/analyze/account_azure_quota_requests.py +177 -0
- maproom/analyze/account_cloudtrail.py +316 -0
- maproom/analyze/account_quota_requests.py +180 -0
- maproom/analyze/analyze_v1_orchestration.py +1194 -0
- maproom/analyze/catalog.py +353 -0
- maproom/analyze/change_detection.py +652 -0
- maproom/analyze/context_client.py +99 -0
- maproom/analyze/context_lookup.py +142 -0
- maproom/analyze/cover_analyze.py +344 -0
- maproom/analyze/cover_client.py +65 -0
- maproom/analyze/cover_lookup.py +242 -0
- maproom/analyze/engine.py +644 -0
- maproom/analyze/fleetfit_endpoints.py +217 -0
- maproom/analyze/fleetfit_policy.py +66 -0
- maproom/analyze/instance_price_analyze.py +221 -0
- maproom/analyze/instance_price_client.py +108 -0
- maproom/analyze/instance_price_lookup.py +60 -0
- maproom/analyze/local_reads.py +484 -0
- maproom/analyze/lookup_http.py +280 -0
- maproom/analyze/metric_format.py +20 -0
- maproom/analyze/migration_method.py +130 -0
- maproom/analyze/move_list.py +93 -0
- maproom/analyze/operator_context.py +156 -0
- maproom/analyze/performance_rank.py +97 -0
- maproom/analyze/primary_recommendation.py +422 -0
- maproom/analyze/provider_comparison.py +401 -0
- maproom/analyze/quota_analyze.py +481 -0
- maproom/analyze/quota_client.py +75 -0
- maproom/analyze/quota_lookup.py +110 -0
- maproom/analyze/quota_outcome_steer.py +105 -0
- maproom/analyze/recommend_batch.py +199 -0
- maproom/analyze/recommend_client.py +362 -0
- maproom/analyze/recommend_share.py +118 -0
- maproom/analyze/recommendation.py +591 -0
- maproom/analyze/reservation_pack.py +883 -0
- maproom/analyze/reservation_read.py +461 -0
- maproom/analyze/safe_analyze.py +1134 -0
- maproom/analyze/safe_move.py +195 -0
- maproom/analyze/safe_moves.py +571 -0
- maproom/analyze/safe_moves_catalog.py +127 -0
- maproom/analyze/safe_moves_client.py +70 -0
- maproom/analyze/series_analyze.py +491 -0
- maproom/analyze/series_client.py +106 -0
- maproom/analyze/series_lookup.py +663 -0
- maproom/analyze/shape.py +254 -0
- maproom/analyze/size_analyze.py +883 -0
- maproom/analyze/size_client.py +81 -0
- maproom/analyze/size_keep.py +409 -0
- maproom/analyze/size_lookup.py +368 -0
- maproom/analyze/specs.py +325 -0
- maproom/analyze/spot_analyze.py +392 -0
- maproom/analyze/spot_client.py +74 -0
- maproom/analyze/spot_lookup.py +213 -0
- maproom/analyze/token_client.py +97 -0
- maproom/analyze/utilization.py +190 -0
- maproom/analyze/workload.py +104 -0
- maproom/analyze/workset.py +762 -0
- maproom/aws_region.py +78 -0
- maproom/cache/__init__.py +1 -0
- maproom/cache/catalog.py +372 -0
- maproom/cache/commands.py +215 -0
- maproom/cache/instances.py +460 -0
- maproom/cli.py +2084 -0
- maproom/cli_argv.py +329 -0
- maproom/cli_floors.py +89 -0
- maproom/cliio/__init__.py +1 -0
- maproom/cliio/registry.py +377 -0
- maproom/cliio/runner.py +489 -0
- maproom/consent/__init__.py +33 -0
- maproom/consent/gate.py +238 -0
- maproom/consent/policy.py +20 -0
- maproom/consent/prompt.py +61 -0
- maproom/consent/service_upload_gate.py +318 -0
- maproom/consent/service_upload_prompt.py +62 -0
- maproom/consent/stdin.py +45 -0
- maproom/consent/storage.py +24 -0
- maproom/consent/write_token.py +29 -0
- maproom/contracts/__init__.py +6 -0
- maproom/contracts/schema_diff.py +119 -0
- maproom/contracts/validate.py +113 -0
- maproom/data/__init__.py +1 -0
- maproom/data/clear.py +76 -0
- maproom/data/commands.py +14 -0
- maproom/doctor/__init__.py +1 -0
- maproom/doctor/aws_session.py +226 -0
- maproom/doctor/checks.py +701 -0
- maproom/doctor/context.py +32 -0
- maproom/doctor/display.py +96 -0
- maproom/doctor/inventory_display.py +377 -0
- maproom/doctor/runner.py +1467 -0
- maproom/errors.py +43 -0
- maproom/exitcodes.py +70 -0
- maproom/inventory/__init__.py +1 -0
- maproom/inventory/account_identity.py +79 -0
- maproom/inventory/accounts.py +155 -0
- maproom/inventory/command.py +961 -0
- maproom/inventory/messages.py +264 -0
- maproom/inventory/reservations_refresh.py +37 -0
- maproom/mock_environment/__init__.py +28 -0
- maproom/mock_environment/load.py +241 -0
- maproom/mock_environment/runner.py +387 -0
- maproom/output/__init__.py +1 -0
- maproom/output/json_envelope.py +241 -0
- maproom/output/redact.py +11 -0
- maproom/output/terminal.py +129 -0
- maproom/parsers.py +284 -0
- maproom/paths.py +105 -0
- maproom/plan/__init__.py +1 -0
- maproom/plan/accept.py +59 -0
- maproom/plan/analysis_context.py +78 -0
- maproom/plan/analyze_selection.py +279 -0
- maproom/plan/commands.py +586 -0
- maproom/plan/current.py +59 -0
- maproom/plan/errors.py +10 -0
- maproom/plan/export.py +36 -0
- maproom/plan/formatting.py +91 -0
- maproom/plan/ids.py +13 -0
- maproom/plan/migration_options.py +75 -0
- maproom/plan/model.py +265 -0
- maproom/plan/names.py +24 -0
- maproom/plan/store.py +193 -0
- maproom/plan/tty.py +34 -0
- maproom/pricing/__init__.py +5 -0
- maproom/pricing/prices.py +119 -0
- maproom/privacy/__init__.py +6 -0
- maproom/privacy/commands.py +159 -0
- maproom/privacy/delete_uploads.py +204 -0
- maproom/privacy/fleetfit_policy.py +125 -0
- maproom/privacy/fleetfit_statement.py +104 -0
- maproom/privacy/format.py +76 -0
- maproom/privacy/manifests.py +342 -0
- maproom/privacy/statement.py +58 -0
- maproom/quotas/__init__.py +21 -0
- maproom/quotas/aws.py +204 -0
- maproom/quotas/azure.py +75 -0
- maproom/quotas/commands.py +240 -0
- maproom/quotas/family_coverage.py +122 -0
- maproom/quotas/fetch.py +124 -0
- maproom/quotas/load.py +41 -0
- maproom/quotas/model.py +178 -0
- maproom/quotas/outcome_ledger.py +245 -0
- maproom/quotas/quota_request_sync.py +221 -0
- maproom/quotas/show.py +73 -0
- maproom/quotas/status.py +206 -0
- maproom/quotas/store.py +161 -0
- maproom/redaction.py +157 -0
- maproom/reference_data/__init__.py +1 -0
- maproom/reference_data/aws/aws_prices.csv +25562 -0
- maproom/reference_data/aws/capabilities.csv +1346 -0
- maproom/reference_data/aws/instance_types.csv +1346 -0
- maproom/reference_data/azure/azure_prices.csv +1 -0
- maproom/reference_data/azure/vm_types.csv +1 -0
- maproom/reference_data/benchmarks/cpu-lscpu-v2-instances.json +27 -0
- maproom/reference_data/benchmarks/safe-moves-v1.json +328 -0
- maproom/reference_data/manifest.json +174 -0
- maproom/reference_data/manifest.py +69 -0
- maproom/reservations/__init__.py +17 -0
- maproom/reservations/aws.py +76 -0
- maproom/reservations/azure.py +36 -0
- maproom/reservations/commands.py +149 -0
- maproom/reservations/load.py +41 -0
- maproom/reservations/model.py +316 -0
- maproom/reservations/show.py +64 -0
- maproom/reservations/status.py +181 -0
- maproom/reservations/store.py +391 -0
- maproom/resources.py +54 -0
- maproom/root_help.py +251 -0
- maproom/saving_plans/__init__.py +15 -0
- maproom/saving_plans/aws.py +73 -0
- maproom/saving_plans/commands.py +122 -0
- maproom/saving_plans/load.py +41 -0
- maproom/saving_plans/model.py +101 -0
- maproom/saving_plans/show.py +64 -0
- maproom/saving_plans/status.py +118 -0
- maproom/saving_plans/store.py +173 -0
- maproom/secret_egress_gate.py +108 -0
- maproom/service/install_id.py +60 -0
- maproom/settings/__init__.py +1 -0
- maproom/settings/defaults.py +73 -0
- maproom/settings/init.py +143 -0
- maproom/settings/model.py +105 -0
- maproom/settings/product_version_change.py +343 -0
- maproom/settings/product_versions.py +68 -0
- maproom/settings/set.py +347 -0
- maproom/settings/show.py +227 -0
- maproom/settings/write.py +273 -0
- maproom/snapshot_time.py +27 -0
- maproom-0.2.0.dist-info/METADATA +263 -0
- maproom-0.2.0.dist-info/RECORD +199 -0
- maproom-0.2.0.dist-info/WHEEL +5 -0
- maproom-0.2.0.dist-info/entry_points.txt +2 -0
- maproom-0.2.0.dist-info/licenses/LICENSE +201 -0
- maproom-0.2.0.dist-info/licenses/NOTICE +72 -0
- maproom-0.2.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
"""Post-analyze plan selection orchestration."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import sys
|
|
6
|
+
from dataclasses import dataclass
|
|
7
|
+
from typing import Any, Callable
|
|
8
|
+
|
|
9
|
+
from maproom.exitcodes import SUCCESS, USAGE
|
|
10
|
+
from maproom.output.json_envelope import (
|
|
11
|
+
build_recommendation_with_plan_envelope,
|
|
12
|
+
print_error_envelope,
|
|
13
|
+
print_json,
|
|
14
|
+
)
|
|
15
|
+
from maproom.plan import accept as accept_selector
|
|
16
|
+
from maproom.plan import current as current_plan
|
|
17
|
+
from maproom.plan import store as plan_store
|
|
18
|
+
from maproom.plan.errors import PlanError
|
|
19
|
+
from maproom.plan.migration_options import format_accept_example
|
|
20
|
+
from maproom.plan.model import build_plan_item
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
@dataclass(frozen=True)
|
|
24
|
+
class AcceptResult:
|
|
25
|
+
plan_name: str
|
|
26
|
+
revision: int
|
|
27
|
+
item_id: str
|
|
28
|
+
candidate: dict[str, Any]
|
|
29
|
+
replaced: bool
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def _usage(message: str, *, as_json: bool) -> int:
|
|
33
|
+
if as_json:
|
|
34
|
+
return print_error_envelope("usage", message, invoked="analyze")
|
|
35
|
+
print(message, file=sys.stderr)
|
|
36
|
+
return USAGE
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def _collect_numbered_candidates(
|
|
40
|
+
doc: dict[str, Any],
|
|
41
|
+
*,
|
|
42
|
+
show_all: bool,
|
|
43
|
+
) -> list[dict[str, Any]]:
|
|
44
|
+
candidates = list(doc.get("recommendations") or [])
|
|
45
|
+
if show_all:
|
|
46
|
+
candidates.extend(list(doc.get("conditional_moves") or []))
|
|
47
|
+
return candidates
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def _default_plan_name(doc: dict[str, Any]) -> str:
|
|
51
|
+
target = doc.get("target") or {}
|
|
52
|
+
instance_type = str(target.get("instance_type") or "rightsizing")
|
|
53
|
+
slug = instance_type.replace(".", "-").lower()
|
|
54
|
+
return slug[:40] or "rightsizing"
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def _resolve_plan_for_add(
|
|
58
|
+
*,
|
|
59
|
+
stdin_is_tty: bool,
|
|
60
|
+
prompt_reader: Callable[[], str],
|
|
61
|
+
doc: dict[str, Any],
|
|
62
|
+
plan_name_at_prompt: str | None,
|
|
63
|
+
) -> tuple[str | PlanError, str | None]:
|
|
64
|
+
"""Return plan name and plan name observed at prompt start for concurrency check."""
|
|
65
|
+
current = current_plan.get_current_plan_name()
|
|
66
|
+
if current:
|
|
67
|
+
return current, plan_name_at_prompt
|
|
68
|
+
if not stdin_is_tty:
|
|
69
|
+
return PlanError("no current plan"), plan_name_at_prompt
|
|
70
|
+
default_name = _default_plan_name(doc)
|
|
71
|
+
answer = prompt_reader(
|
|
72
|
+
f'No current plan exists. Create one for this choice? name [{default_name}]: '
|
|
73
|
+
).strip()
|
|
74
|
+
chosen = answer or default_name
|
|
75
|
+
created = plan_store.create_plan(chosen)
|
|
76
|
+
if isinstance(created, PlanError):
|
|
77
|
+
return created, plan_name_at_prompt
|
|
78
|
+
err = current_plan.set_current_plan_name(chosen)
|
|
79
|
+
if err is not None:
|
|
80
|
+
return err, plan_name_at_prompt
|
|
81
|
+
print(f'Started plan "{chosen}".')
|
|
82
|
+
return chosen, plan_name_at_prompt
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
def _add_candidate_to_plan(
|
|
86
|
+
*,
|
|
87
|
+
plan_name: str,
|
|
88
|
+
candidate: dict[str, Any],
|
|
89
|
+
doc: dict[str, Any],
|
|
90
|
+
profile: dict[str, Any],
|
|
91
|
+
force: bool,
|
|
92
|
+
plan_name_at_prompt: str | None,
|
|
93
|
+
) -> AcceptResult | PlanError:
|
|
94
|
+
if plan_name_at_prompt is not None:
|
|
95
|
+
latest = current_plan.get_current_plan_name()
|
|
96
|
+
if latest != plan_name_at_prompt:
|
|
97
|
+
return PlanError(
|
|
98
|
+
"current plan changed during selection; aborting add. "
|
|
99
|
+
"Re-run analyze and try again."
|
|
100
|
+
)
|
|
101
|
+
record = plan_store.load_plan(plan_name)
|
|
102
|
+
if isinstance(record, PlanError):
|
|
103
|
+
return record
|
|
104
|
+
existing_ids = {item.item_id for item in record.items}
|
|
105
|
+
target = doc.get("target") or {}
|
|
106
|
+
item = build_plan_item(
|
|
107
|
+
candidate=candidate,
|
|
108
|
+
profile=profile,
|
|
109
|
+
resource=str(target.get("instance_id") or ""),
|
|
110
|
+
cloud=str(doc.get("cloud") or "aws"),
|
|
111
|
+
region=str(target.get("region") or profile.get("region") or ""),
|
|
112
|
+
existing_ids=existing_ids,
|
|
113
|
+
analysis_doc=doc,
|
|
114
|
+
)
|
|
115
|
+
result = plan_store.add_item(plan_name, item, force=force)
|
|
116
|
+
if isinstance(result, PlanError):
|
|
117
|
+
return result
|
|
118
|
+
return AcceptResult(
|
|
119
|
+
plan_name=plan_name,
|
|
120
|
+
revision=result.record.revision,
|
|
121
|
+
item_id=result.item_id,
|
|
122
|
+
candidate=candidate,
|
|
123
|
+
replaced=result.replaced,
|
|
124
|
+
)
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
def _print_add_confirmation(result: AcceptResult, doc: dict[str, Any]) -> None:
|
|
128
|
+
target = doc.get("target") or {}
|
|
129
|
+
resource = str(target.get("instance_id") or "")
|
|
130
|
+
opts = ", ".join(result.candidate.get("migration_options") or [])
|
|
131
|
+
print(
|
|
132
|
+
f'Added {result.candidate.get("instance_type")} to plan '
|
|
133
|
+
f'"{result.plan_name}" as {result.item_id}.'
|
|
134
|
+
)
|
|
135
|
+
print("Nothing has been submitted or changed in the cloud provider.")
|
|
136
|
+
print(
|
|
137
|
+
"To select this non-interactively: "
|
|
138
|
+
f"{format_accept_example(list(result.candidate.get('migration_options') or []), resource)}"
|
|
139
|
+
)
|
|
140
|
+
print(f"Selected price: USD {result.candidate.get('price_per_month_usd')}/mo")
|
|
141
|
+
print(f"Migration options: {opts}")
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
def maybe_run_tty_selection(
|
|
145
|
+
doc: dict[str, Any],
|
|
146
|
+
profile: dict[str, Any],
|
|
147
|
+
*,
|
|
148
|
+
show_all: bool,
|
|
149
|
+
stdin_is_tty: bool,
|
|
150
|
+
stdout_is_tty: bool = True,
|
|
151
|
+
prompt_reader: Callable[[], str] | None = None,
|
|
152
|
+
force: bool = False,
|
|
153
|
+
) -> int:
|
|
154
|
+
interactive = stdin_is_tty and stdout_is_tty
|
|
155
|
+
if not interactive:
|
|
156
|
+
if not stdin_is_tty:
|
|
157
|
+
default_name = _default_plan_name(doc)
|
|
158
|
+
print(
|
|
159
|
+
f"Create a plan with: maproom plan create {default_name}"
|
|
160
|
+
)
|
|
161
|
+
return SUCCESS
|
|
162
|
+
candidates = _collect_numbered_candidates(doc, show_all=show_all)
|
|
163
|
+
if not candidates:
|
|
164
|
+
return SUCCESS
|
|
165
|
+
read_prompt = prompt_reader or input
|
|
166
|
+
current = current_plan.get_current_plan_name()
|
|
167
|
+
if current:
|
|
168
|
+
print(f'Add a recommendation to current plan "{current}"')
|
|
169
|
+
else:
|
|
170
|
+
print("Add a recommendation to a plan")
|
|
171
|
+
prompt = "[1"
|
|
172
|
+
if len(candidates) > 1:
|
|
173
|
+
prompt += f"/{len(candidates)}"
|
|
174
|
+
if show_all:
|
|
175
|
+
prompt += ", a=show all"
|
|
176
|
+
prompt += ", Enter=skip]: "
|
|
177
|
+
try:
|
|
178
|
+
choice = read_prompt(prompt).strip()
|
|
179
|
+
except EOFError:
|
|
180
|
+
return _usage(
|
|
181
|
+
"confirmation closed before an answer.",
|
|
182
|
+
as_json=False,
|
|
183
|
+
)
|
|
184
|
+
except KeyboardInterrupt:
|
|
185
|
+
print("", file=sys.stderr)
|
|
186
|
+
return SUCCESS
|
|
187
|
+
if not choice:
|
|
188
|
+
return SUCCESS
|
|
189
|
+
if choice.lower() in {"a", "--all"} and not show_all:
|
|
190
|
+
return maybe_run_tty_selection(
|
|
191
|
+
doc,
|
|
192
|
+
profile,
|
|
193
|
+
show_all=True,
|
|
194
|
+
stdin_is_tty=stdin_is_tty,
|
|
195
|
+
stdout_is_tty=stdout_is_tty,
|
|
196
|
+
prompt_reader=prompt_reader,
|
|
197
|
+
force=force,
|
|
198
|
+
)
|
|
199
|
+
if not choice.isdigit():
|
|
200
|
+
return SUCCESS
|
|
201
|
+
index = int(choice)
|
|
202
|
+
if index < 1 or index > len(candidates):
|
|
203
|
+
return SUCCESS
|
|
204
|
+
candidate = candidates[index - 1]
|
|
205
|
+
plan_name_at_prompt = current_plan.get_current_plan_name()
|
|
206
|
+
resolved = _resolve_plan_for_add(
|
|
207
|
+
stdin_is_tty=stdin_is_tty,
|
|
208
|
+
prompt_reader=read_prompt,
|
|
209
|
+
doc=doc,
|
|
210
|
+
plan_name_at_prompt=plan_name_at_prompt,
|
|
211
|
+
)
|
|
212
|
+
plan_name, observed = resolved
|
|
213
|
+
if isinstance(plan_name, PlanError):
|
|
214
|
+
return _usage(plan_name.message, as_json=False)
|
|
215
|
+
added = _add_candidate_to_plan(
|
|
216
|
+
plan_name=plan_name,
|
|
217
|
+
candidate=candidate,
|
|
218
|
+
doc=doc,
|
|
219
|
+
profile=profile,
|
|
220
|
+
force=force,
|
|
221
|
+
plan_name_at_prompt=observed,
|
|
222
|
+
)
|
|
223
|
+
if isinstance(added, PlanError):
|
|
224
|
+
return _usage(added.message, as_json=False)
|
|
225
|
+
_print_add_confirmation(added, doc)
|
|
226
|
+
return SUCCESS
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
def run_accept_selection(
|
|
230
|
+
doc: dict[str, Any],
|
|
231
|
+
profile: dict[str, Any],
|
|
232
|
+
accept_values: list[str],
|
|
233
|
+
*,
|
|
234
|
+
force: bool,
|
|
235
|
+
as_json: bool,
|
|
236
|
+
) -> tuple[int, AcceptResult | None]:
|
|
237
|
+
plan_name = current_plan.get_current_plan_name()
|
|
238
|
+
if not plan_name:
|
|
239
|
+
default_name = _default_plan_name(doc)
|
|
240
|
+
return (
|
|
241
|
+
_usage(
|
|
242
|
+
"no current plan. "
|
|
243
|
+
f"Create one with: maproom plan create {default_name}",
|
|
244
|
+
as_json=as_json,
|
|
245
|
+
),
|
|
246
|
+
None,
|
|
247
|
+
)
|
|
248
|
+
candidate = accept_selector.select_accept_candidate(doc, accept_values)
|
|
249
|
+
if isinstance(candidate, PlanError):
|
|
250
|
+
return _usage(candidate.message, as_json=as_json), None
|
|
251
|
+
added = _add_candidate_to_plan(
|
|
252
|
+
plan_name=plan_name,
|
|
253
|
+
candidate=candidate,
|
|
254
|
+
doc=doc,
|
|
255
|
+
profile=profile,
|
|
256
|
+
force=force,
|
|
257
|
+
plan_name_at_prompt=None,
|
|
258
|
+
)
|
|
259
|
+
if isinstance(added, PlanError):
|
|
260
|
+
return _usage(added.message, as_json=as_json), None
|
|
261
|
+
if as_json:
|
|
262
|
+
envelope = build_recommendation_with_plan_envelope(
|
|
263
|
+
doc,
|
|
264
|
+
plan_mutation={
|
|
265
|
+
"action": "item_added",
|
|
266
|
+
"plan_name": added.plan_name,
|
|
267
|
+
"revision": added.revision,
|
|
268
|
+
"item_id": added.item_id,
|
|
269
|
+
"candidate_id": added.candidate.get("candidate_id"),
|
|
270
|
+
"resource": (doc.get("target") or {}).get("instance_id"),
|
|
271
|
+
},
|
|
272
|
+
)
|
|
273
|
+
print_json(envelope)
|
|
274
|
+
else:
|
|
275
|
+
opts = ", ".join(added.candidate.get("migration_options") or [])
|
|
276
|
+
print(f"Selected price: USD {added.candidate.get('price_per_month_usd')}/mo")
|
|
277
|
+
print(f"Migration options: {opts}")
|
|
278
|
+
_print_add_confirmation(added, doc)
|
|
279
|
+
return SUCCESS, added
|