in azext_edge/edge/providers/orchestration/clone.py [0:0]
def analyze_cluster(self, force: Optional[bool] = None) -> "CloneState":
"""
This method analyzes the connected cluster and prepares the resources for cloning.
Ensure compatibility with the instance version and build the necessary parameters and metadata.
"""
with Progress(
SpinnerColumn("star"),
*Progress.get_default_columns(),
"Elapsed:",
TimeElapsedColumn(),
transient=True,
disable=bool(self.no_progress),
) as progress:
_ = progress.add_task(f"Analyzing {self.instance_name}...", total=None)
self.version_guru.ensure_compat(force)
self._build_parameters()
self._build_metadata()
self._analyze_extensions()
self._analyze_instance()
self._analyze_instance_identity()
self._analyze_instance_resources()
self._analyze_secretsync()
self._analyze_assets()
return CloneState(
cmd=self.cmd,
instance_record=self.instance_record,
instances=self.instances,
namespace=self.custom_location["properties"]["namespace"],
resources=self._enumerate_resources(),
template_gen=TemplateGen(
self.rcontainer_map, self.parameter_map, self.variable_map, self.metadata_map
),
user_assigned_mis=self.instance_identities,
)