lib/heirloom/cli/shared.rb in heirloom-0.7.0rc1 vs lib/heirloom/cli/shared.rb in heirloom-0.7.0
- old
+ new
@@ -143,8 +143,33 @@
logger.error "Not empty."
exit 1
end
end
+ def ensure_catalog_domain_exists(args)
+ config = args[:config]
+ catalog = args[:catalog]
+ logger = config.logger
+ region = config.metadata_region
+
+ unless catalog.catalog_domain_exists?
+ logger.error "Catalog does not exist in #{region}."
+ exit 1
+ end
+ end
+
+ def ensure_entry_exists_in_catalog(args)
+ config = args[:config]
+ catalog = args[:catalog]
+ entry = args[:entry]
+ logger = config.logger
+ region = config.metadata_region
+
+ unless catalog.entry_exists_in_catalog? entry
+ logger.error "Entry for #{entry} does not exist in #{region} catalog."
+ exit 1
+ end
+ end
+
end
end
end