You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
logger.error(style(f"The operation has been aborted due to your answer.", fg="red"))
63
62
returnFalse
64
63
else:
65
-
logger.info(style(f"Metadata cloned successfully from {cloudinary.config().cloud_name} to {target_config.cloud_name}. We will now proceed with cloning the assets.", fg="green"))
64
+
logger.info(style(f"The metadata process from {cloudinary.config().cloud_name} to {target_config.cloud_name} is now done. We will now proceed with cloning the assets.", fg="green"))
logger.info(style(f"{(' '.join(key.split('_')))} in `{dict(options)['cloud_name']}` and in `{cloudinary.config().cloud_name}` are identical. No {(' '.join(key.split('_')))} will be cloned", fg="yellow"))
68
-
ifnotconfirm_action(
69
-
f"If you had some {key} in the target environment, "
70
-
f"new values from the source environment won't be cloned.\n"
71
-
f"Would you like to still proceed with the cloning of assets? (y/N).\n"):
72
-
logger.info("Stopping.")
73
-
returnFalse
74
-
else:
75
-
logger.info("Continuing.")
76
-
else:
77
-
logger.info(style(f"{only_in_source} are only in `{dict(options)['cloud_name']}` and will be cloned to `{cloudinary.config().cloud_name}`.", fg="blue"))
87
+
88
+
ifnotonly_in_source_items:
89
+
logger.info(style(
90
+
f"All metadata {item_type} from `{source_cloud}` already exist in `{target_cloud}`. "
91
+
f"No metadata {item_type} cloning needed.",
92
+
fg="yellow"
93
+
))
94
+
returnTrue
95
+
96
+
logger.info(style(
97
+
f"Metadata {item_type}{only_in_source_items} will be cloned from `{source_cloud}` to `{target_cloud}`.",
98
+
fg="yellow"
99
+
))
100
+
101
+
ifcommon_items:
102
+
logger.info(style(
103
+
f"Metadata {item_type}{list(common_items)} exist in both clouds and will be skipped.",
104
+
fg="yellow"
105
+
))
106
+
ifnotforce:
78
107
ifnotconfirm_action(
79
-
f"You have a {key} mismatch between the source and target environment.\n"
80
-
f"Confirming this action will create the missing {key} and their values.\n"
81
-
f"If you currently have some {key} in the target environment, "
82
-
f"new values from the source environment won't be cloned.\n"
108
+
f"Based on the analysis above, \n"
109
+
f"The module will now copy the metadata {item_type} from {cloudinary.config().cloud_name} to {dict(options)['cloud_name']}.\n"
83
110
f"Continue? (y/N)"):
84
111
logger.info("Stopping.")
85
112
returnFalse
86
113
else:
87
-
logger.info("Continuing.")
88
-
logger.info(style(f"Copying {len(only_in_source)}{(' '.join(key.split('_')))} from {cloudinary.config().cloud_name} to {dict(options)['cloud_name']}", fg="blue"))
0 commit comments