[PATCH aeolus-cli 1/2] added section explaining .aeolus-cli into manpage
by Maros Zatko
From: Maros Zatko <mzatko(a)redhat.com>
---
man/aeolus-cli.1 | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/man/aeolus-cli.1 b/man/aeolus-cli.1
index 9275be4..0aaeb06 100644
--- a/man/aeolus-cli.1
+++ b/man/aeolus-cli.1
@@ -5,11 +5,24 @@ aeolus-cli \- command line tool for managing aeolus images
.B aeolus-cli
[\-h]
.SH DESCRIPTION
-aeolus-cli is a tool that allows users to control their aeolus images through image builder and aeolus conductor. aeolus-cli offers four commands options; list, build, push, import. For more information on each command please run man aeolus-cli <command> or aeolus-cli --help
+aeolus-cli is a tool that allows users to control their aeolus images through image builder and aeolus conductor. aeolus-cli offers four commands options; list, build, push, import. For more information on each command please run man aeolus-cli <command> or aeolus-cli --help
.SH OPTIONS
.TP
\-h, --help
Get usage information for this tool and subcommands
+.SH FILES
+.P
+aeolus-cli reads it's configuration from ~/.aeolus-cli
+.P
+.I ~/.aeolus-cli
+.RS
+There is URL pointing to
+.B iwhd
+and URL with credentials to
+.B aeolus-conductor.
+If setup differs from default one, those should be changed accordingly. Conductor URL should be as follows
+.I https://<host_where_conductor_runs>/conductor/api
+.RE
.SH AUTHOR
Martyn Taylor (mtaylor(a)redhat.com), Jason Guiditta (jguiditta(a)redhat.com)
.SH SEE ALSO
--
1.7.7.1
12 years, 6 months
[PATCH conductor 2/2] internationalize api error codes
by Richard Su
---
src/app/views/api/error.xml.haml | 2 +-
src/config/locales/en.yml | 16 ++++++
src/lib/exceptions.rb | 109 ++++++++++++++++++++++++++++++++------
3 files changed, 110 insertions(+), 17 deletions(-)
diff --git a/src/app/views/api/error.xml.haml b/src/app/views/api/error.xml.haml
index 15d9efd..0ef3597 100644
--- a/src/app/views/api/error.xml.haml
+++ b/src/app/views/api/error.xml.haml
@@ -1,4 +1,4 @@
!!!XML
%error
- %code=error.class.name.demodulize
+ %code=error.code_name
%message=error.message
\ No newline at end of file
diff --git a/src/config/locales/en.yml b/src/config/locales/en.yml
index 24b791e..d670042 100644
--- a/src/config/locales/en.yml
+++ b/src/config/locales/en.yml
@@ -1025,6 +1025,22 @@ en:
new:
create_new: Create a new Realm Mapping
api:
+ error_codes:
+ build_delete_failure: BuildDeleteFailure
+ build_not_found: BuildNotFound
+ image_delete_failure: ImageDeleteFailure
+ image_not_found: ImageNotFound
+ insufficient_parameters_supplied: InsufficientParametersSupplied
+ parameter_data_incorrect: ParameterDataIncorrect
+ push_error: PushError
+ provider_account_not_found: ProviderAccountNotFound
+ provider_image_delete_failure: ProviderImageDeleteFailure
+ provider_image_not_found: ProviderImageNotFound
+ provider_image_status_not_found: ProviderImageStatusNotFound
+ target_image_delete_failure: TargetImageDeleteFailure
+ target_image_not_found: TargetImageNotFound
+ target_image_status_not_found: TargetImageStatusNotFound
+ target_not_found: TargetNotFound
error_messages:
build_not_found: Could not find Build %{build}
image_not_found: Could not find Image %{image}
diff --git a/src/lib/exceptions.rb b/src/lib/exceptions.rb
index af196cf..2ad9109 100644
--- a/src/lib/exceptions.rb
+++ b/src/lib/exceptions.rb
@@ -4,28 +4,105 @@ module Aeolus
class Error < StandardError
attr_reader :status
attr_reader :message
+ attr_reader :code_name
- def initialize(status, message = nil)
+ def initialize(code_name, status, message = nil)
@status = status
@message = message
+ @code_name = code_name
+ end
+ end
+
+ class BuildDeleteFailure < Error
+ def initialize(status, message = nil)
+ super(I18n::t("api.error_codes.build_delete_failure"), status, message)
+ end
+ end
+
+ class BuildNotFound < Error
+ def initialize(status, message = nil)
+ super(I18n::t("api.error_codes.build_not_found"), status, message)
+ end
+ end
+
+ class ImageDeleteFailure < Error
+ def initialize(status, message = nil)
+ super(I18n::t("api.error_codes.image_delete_failure"), status, message)
+ end
+ end
+
+ class ImageNotFound < Error
+ def initialize(status, message = nil)
+ super(I18n::t("api.error_codes.image_not_found"), status, message)
+ end
+ end
+
+ class InsufficientParametersSupplied < Error
+ def initialize(status, message = nil)
+ super(I18n::t("api.error_codes.insufficient_parameters_supplied"), status, message)
+ end
+ end
+
+ class ParameterDataIncorrect < Error
+ def initialize(status, message = nil)
+ super(I18n::t("api.error_codes.parameter_data_incorrect"), status, message)
+ end
+ end
+
+ class PushError < Error
+ def initialize(status, message = nil)
+ super(I18n::t("api.error_codes.push_error"), status, message)
+ end
+ end
+
+ class ProviderAccountNotFound < Error
+ def initialize(status, message = nil)
+ super(I18n::t("api.error_codes.provider_account_not_found"), status, message)
+ end
+ end
+
+ class ProviderImageDeleteFailure < Error
+ def initialize(status, message = nil)
+ super(I18n::t("api.error_codes.provider_image_delete_failure"), status, message)
+ end
+ end
+
+ class ProviderImageNotFound < Error
+ def initialize(status, message = nil)
+ super(I18n::t("api.error_codes.provider_image_not_found"), status, message)
+ end
+ end
+
+ class ProviderImageStatusNotFound < Error
+ def initialize(status, message = nil)
+ super(I18n::t("api.error_codes.provider_image_status_not_found"), status, message)
+ end
+ end
+
+ class TargetImageDeleteFailure < Error
+ def initialize(status, message = nil)
+ super(I18n::t("api.error_codes.target_image_delete_failure"), status, message)
+ end
+ end
+
+ class TargetImageNotFound < Error
+ def initialize(status, message = nil)
+ super(I18n::t("api.error_codes.target_image_not_found"), status, message)
+ end
+ end
+
+ class TargetImageStatusNotFound < Error
+ def initialize(status, message = nil)
+ super(I18n::t("api.error_codes.target_image_status_not_found"), status, message)
+ end
+ end
+
+ class TargetNotFound < Error
+ def initialize(status, message = nil)
+ super(I18n::t("api.error_codes.target_not_found"), status, message)
end
end
- class BuildDeleteFailure < Error; end
- class BuildNotFound < Error; end
- class ImageDeleteFailure < Error; end
- class ImageNotFound < Error; end
- class InsufficientParametersSupplied < Error; end
- class ParameterDataIncorrect < Error; end
- class PushError < Error; end
- class ProviderAccountNotFound < Error; end
- class ProviderImageDeleteFailure < Error; end
- class ProviderImageNotFound < Error; end
- class ProviderImageStatusNotFound < Error; end
- class TargetImageDeleteFailure < Error; end
- class TargetImageNotFound < Error; end
- class TargetImageStatusNotFound < Error; end
- class TargetNotFound < Error; end
end
end
end
--
1.7.6.4
12 years, 6 months
[PATCH Audrey] Update to deliver src/config.in.ru
by Joseph VLcek
Prior to this patch src/config.in was being delivered in the
source tarball with an already modified version.
This patch will have the source file will be delivered without
the version modified to correctly match what is in the source
repo.
12 years, 6 months
[PATCH conductor 0/1] #2815 - Image import UI
by Matt Wagner
This implements the image import UI in https://www.aeolusproject.org/redmine/issues/2815.
It's currently accessed through the Images list under Environments. There was no established mockup for what this should look like, so I just went with my best guess for how it should look/feel and where it should live, since it's easy enough to tweak if needed.
Two things I'd love a reviewer to weigh in on:
- Does this need to be locked down to only certain roles / permissions? I was unable to find any existing permission checks on the image code, so I didn't implement any new ones.
- Right now, if the (optional) XML image description is invalid in some way, we just ignore it and generate a stock XML document indicating the image name (slaved to the image ID). That doesn't feel entirely right, but we just pass it to Factory without doing any real validation anyway, and it's an optional field. (Plus it's not clear to me how useful this is... I tried to specify an OS/architecture in the XML and upload that, but the settings didn't get picked up when we passed it in.)
It should work as-is, but I hoped for a second opinion on the above two points before committing.
-- Matt
12 years, 6 months
[PATCH conductor 0/1] Tame dbomatic a little
by Matt Wagner
While working on #2843[1], I was poking around the Event records in my development database, which is only a few days old.
I mistakenly did "e = Event.all" in the console. This turned out to be a mistake:
>> Event.count
=> 26004
It turns out that, every time we fetch an instance status in dbomatic (which appears to be about every 60 seconds), we log an Event with state=running if the instance is running.
This patch causes us to only log an Event (or save the Instance record) if any of the Instance attributes have changed.
This seems to work beautifully, but wouldn't mind a quick sanity check from someone else.
[1] https://www.aeolusproject.org/redmine/issues/2843
12 years, 6 months