[PATCH conductor] Toggle control just tab content
by jzigmund@redhat.com
---
src/app/controllers/pools_controller.rb | 17 ++++++++++++-----
src/app/views/deployments/_filter_view.haml | 2 +-
src/app/views/deployments/_pretty_view.haml | 2 +-
src/app/views/pools/_deployments.haml | 3 ++-
src/app/views/pools/_header_show.haml | 2 +-
src/app/views/pools/_history.haml | 3 ---
src/app/views/pools/_history_filter.haml | 2 ++
src/app/views/pools/_history_pretty.haml | 2 ++
src/app/views/pools/_permissions.haml | 3 +--
src/app/views/pools/_pretty_list.haml | 2 +-
src/app/views/pools/show.haml | 4 ++--
src/features/pool.feature | 1 -
src/public/javascripts/application.js | 19 ++++++++++++++++++-
13 files changed, 43 insertions(+), 19 deletions(-)
delete mode 100644 src/app/views/pools/_history.haml
create mode 100644 src/app/views/pools/_history_filter.haml
create mode 100644 src/app/views/pools/_history_pretty.haml
diff --git a/src/app/controllers/pools_controller.rb b/src/app/controllers/pools_controller.rb
index 9e3b060..bb166d2 100644
--- a/src/app/controllers/pools_controller.rb
+++ b/src/app/controllers/pools_controller.rb
@@ -18,7 +18,7 @@ class PoolsController < ApplicationController
def index
clear_breadcrumbs
- save_breadcrumb(pools_path(:viewstate => @viewstate ? @viewstate.id : nil))
+ save_breadcrumb(pools_path(:viewstate => viewstate_id))
@user_pools = Pool.list_for_user(current_user, Privilege::VIEW)
if filter_view?
@@ -59,20 +59,27 @@ class PoolsController < ApplicationController
def show
@pool = Pool.find(params[:id])
- save_breadcrumb(pool_path(@pool), @pool.name)
+ save_breadcrumb(pool_path(@pool, :vievstate => viewstate_id), @pool.name)
require_privilege(Privilege::VIEW, @pool)
@statistics = @pool.statistics
- @view = filter_view? ? 'deployments/filter_view' : 'deployments/pretty_view'
+ @view = filter_view? ? 'deployments/filter_view' : 'deployments/pretty_view' unless params[:details_tab]
+ if params[:details_tab] == 'deployments'
+ @view = filter_view? ? 'deployments/filter_view' : 'deployments/pretty_view'
+ elsif params[:details_tab] == 'history'
+ @view = filter_view? ? 'history_filter' : 'history_pretty'
+ end
#TODO add links to real data for history,properties,permissions
@tabs = [{:name => 'Deployments', :view => @view, :id => 'deployments', :count => @pool.deployments.count},
{:name => 'History', :view => @view, :id => 'history'},
{:name => 'Properties', :view => 'properties', :id => 'properties'},
- {:name => 'Permissions', :view => @view, :id => 'permissions'}
+ {:name => 'Permissions', :view => 'permissions', :id => 'permissions'}
]
details_tab_name = params[:details_tab].blank? ? 'deployments' : params[:details_tab]
@details_tab = @tabs.find {|t| t[:id] == details_tab_name} || @tabs.first[:name].downcase
+ @deployments = @pool.deployments if @details_tab[:id] == 'deployments'
+ @view = @details_tab[:view]
respond_to do |format|
- format.js { render :partial => params[:only_tab] == "true" ? @details_tab[:view] : @view , :locals => {:deployments => @pool.deployments}}
+ format.js { render :partial => @view }
format.html { render :action => :show}
format.json { render :json => @pool }
end
diff --git a/src/app/views/deployments/_filter_view.haml b/src/app/views/deployments/_filter_view.haml
index 9812547..4b6a2f3 100644
--- a/src/app/views/deployments/_filter_view.haml
+++ b/src/app/views/deployments/_filter_view.haml
@@ -1,4 +1,4 @@
-= filter_table(@deployments_header, deployments) do |deployment|
+= filter_table(@deployments_header, @deployments) do |deployment|
%tr
%td
%input{:name => "deployment_selected[]", :type => "checkbox", :value => deployment.id, :id => "deployment_checkbox_#{deployment.id}" }
diff --git a/src/app/views/deployments/_pretty_view.haml b/src/app/views/deployments/_pretty_view.haml
index 5721367..b62f0f8 100644
--- a/src/app/views/deployments/_pretty_view.haml
+++ b/src/app/views/deployments/_pretty_view.haml
@@ -1 +1 @@
-= render :partial => deployments
\ No newline at end of file
+= render :partial => @deployments
\ No newline at end of file
diff --git a/src/app/views/pools/_deployments.haml b/src/app/views/pools/_deployments.haml
index ea2ddb3..23e6a78 100644
--- a/src/app/views/pools/_deployments.haml
+++ b/src/app/views/pools/_deployments.haml
@@ -1,4 +1,5 @@
-- deployments.in_groups_of(5, false) do |group|
+- @deployments ||= deployments
+- @deployments.in_groups_of(5, false) do |group|
%ul.deployment-array.small
- group.each do |deployment|
%li.deployment
diff --git a/src/app/views/pools/_header_show.haml b/src/app/views/pools/_header_show.haml
index f8d9f40..9ccb8f9 100644
--- a/src/app/views/pools/_header_show.haml
+++ b/src/app/views/pools/_header_show.haml
@@ -3,7 +3,7 @@
= [@pool.name, "Pool"].join(' ')
#obj_actions.button-container
.button-group
- = pretty_filter_toggle(pool_path(@pool, :view => 'pretty'), pool_path(@pool, :view => 'filter'))
+ = pretty_filter_toggle(pool_path(@pool, :view => 'pretty', :details_tab => @details_tab[:id]), pool_path(@pool, :view => 'filter', :details_tab => @details_tab[:id]))
= link_to 'New Deployment', launch_new_deployments_path(:pool_id => @pool.id), :class => 'button primary', :id => 'new_deployment_button'
.button-group
= link_to 'Edit', edit_pool_path(@pool), :class => 'button pill', :id => 'edit_pool_button'
diff --git a/src/app/views/pools/_history.haml b/src/app/views/pools/_history.haml
deleted file mode 100644
index 4769d92..0000000
--- a/src/app/views/pools/_history.haml
+++ /dev/null
@@ -1,3 +0,0 @@
-%h3
- History for
- = @pool.name
diff --git a/src/app/views/pools/_history_filter.haml b/src/app/views/pools/_history_filter.haml
new file mode 100644
index 0000000..709dabe
--- /dev/null
+++ b/src/app/views/pools/_history_filter.haml
@@ -0,0 +1,2 @@
+%h3
+ History(filter view) has not been implemented yet.
diff --git a/src/app/views/pools/_history_pretty.haml b/src/app/views/pools/_history_pretty.haml
new file mode 100644
index 0000000..f3aa855
--- /dev/null
+++ b/src/app/views/pools/_history_pretty.haml
@@ -0,0 +1,2 @@
+%h3
+ History(pretty view) has not been implemented yet.
diff --git a/src/app/views/pools/_permissions.haml b/src/app/views/pools/_permissions.haml
index fbd252e..43e570f 100644
--- a/src/app/views/pools/_permissions.haml
+++ b/src/app/views/pools/_permissions.haml
@@ -1,3 +1,2 @@
%h3
- Permissions for
- = @pool.name
+ Permissions have not been implemented yet.
diff --git a/src/app/views/pools/_pretty_list.haml b/src/app/views/pools/_pretty_list.haml
index dd6785b..9c6ee86 100644
--- a/src/app/views/pools/_pretty_list.haml
+++ b/src/app/views/pools/_pretty_list.haml
@@ -7,7 +7,7 @@
%div.pool.overview{:id => ['pool', pool.id], :class => ('collapsed' unless pool.deployments.count > 0)}
%header
%h3.name
- %a{:href => pool_path(pool)}= pool.name
+ = link_to pool.name, pool
%dl.statistics
%ul.groups
%li
diff --git a/src/app/views/pools/show.haml b/src/app/views/pools/show.haml
index 68c51a3..eebff5e 100644
--- a/src/app/views/pools/show.haml
+++ b/src/app/views/pools/show.haml
@@ -11,7 +11,7 @@
%ul#tab-container-1-nav
- @tabs.each do |tab|
%li
- %a{ :href => url_for(:details_tab => tab[:id], :only_tab => true), :id => "details_#{tab[:id]}", :class => "#{'active' if @details_tab[:id] == tab[:id]}"}
+ %a{ :href => url_for(:details_tab => tab[:id], :only_tab => true), :id => "details_#{tab[:id]}", :class => "#{'active' if @details_tab[:id] == tab[:id]} show"}
= tab[:name]
-if tab[:count]
%span.label.badge.count.dark=tab[:count]
@@ -19,4 +19,4 @@
%a.collapse{'href'=>'#'} Collapse
.content.collapsible.toggle-view.pools#tab
%ul.deployable-cards
- = render :partial => @view, :locals => {:deployments => @pool.deployments}
\ No newline at end of file
+ = render :partial => @view
diff --git a/src/features/pool.feature b/src/features/pool.feature
index c5867ef..9215efc 100644
--- a/src/features/pool.feature
+++ b/src/features/pool.feature
@@ -33,7 +33,6 @@ Feature: Manage Pools
Then I should get back a partial
And I should see "mockpool"
- @tag
Scenario: View Pool's Quota Usage
Given I have Pool Creator permissions on a pool named "mockpool"
And the "mockpool" Pool has a quota with following capacities:
diff --git a/src/public/javascripts/application.js b/src/public/javascripts/application.js
index 975cf92..fba9703 100644
--- a/src/public/javascripts/application.js
+++ b/src/public/javascripts/application.js
@@ -69,9 +69,26 @@ var Conductor = {
$('#tab').html(data)
.show();
});
+
+ if ($(this).hasClass("show"))
+ $.get('/pools/show/viewstate', function(data){
+ var data = JSON.parse(data);
+ Conductor.setupToogleTypeViewUrl(data.details_tab);
+ });
+
Conductor.tabRemoveActiveClass();
$(this).addClass('active');
- });
+ });
+ },
+
+ setupToogleTypeViewUrl: function (tab) {
+ var oldPrettyUrl = $("span.view-toggle a#pretty_view").attr('href');
+ var oldFilterUrl = $("span.view-toggle a#filter_view").attr('href');
+ var prettyUrl = oldPrettyUrl.replace(/tab=.*&/, "tab=" + tab + "&");
+ var filterUrl = oldFilterUrl.replace(/tab=.*&/, "tab=" + tab + "&");
+ $("span.view-toggle a#pretty_view").attr('href', prettyUrl);
+ $("span.view-toggle a#filter_view").attr('href', filterUrl);
+
},
tabRemoveActiveClass: function () {
--
1.7.4.4
12 years, 9 months
[PATCH conductor] Remove some unused JSON serialization code
by Mark McLoughlin
This code was used in oVirt Server, but not Conductor.
---
src/app/controllers/application_controller.rb | 35 -------------------------
1 files changed, 0 insertions(+), 35 deletions(-)
diff --git a/src/app/controllers/application_controller.rb b/src/app/controllers/application_controller.rb
index b7da1d3..8329459 100644
--- a/src/app/controllers/application_controller.rb
+++ b/src/app/controllers/application_controller.rb
@@ -98,41 +98,6 @@ class ApplicationController < ActionController::Base
end
end
- # don't define find_opts for array inputs
- def json_hash(full_items, attributes, arg_list=[], find_opts={}, id_method=:id)
- page = params[:page].to_i
- paginate_opts = {:page => page,
- :order => "#{params[:sortname]} #{params[:sortorder]}",
- :per_page => params[:rp]}
- arg_list << find_opts.merge(paginate_opts)
- item_list = full_items.paginate(*arg_list)
- json_hash = {}
- json_hash[:page] = page
- json_hash[:total] = item_list.total_entries
- json_hash[:rows] = item_list.collect do |item|
- item_hash = {}
- item_hash[:id] = item.send(id_method)
- item_hash[:cell] = attributes.collect do |attr|
- if attr.is_a? Array
- value = item
- attr.each { |attr_item| value = (value.nil? ? nil : value.send(attr_item))}
- value
- else
- item.send(attr)
- end
- end
- item_hash
- end
- json_hash
- end
-
- # json_list is a helper method used to format data for paginated flexigrid tables
- #
- # FIXME: what is the intent of this comment? don't define find_opts for array inputs
- def json_list(full_items, attributes, arg_list=[], find_opts={}, id_method=:id)
- render :json => json_hash(full_items, attributes, arg_list, find_opts, id_method).to_json
- end
-
def get_nav_items
if current_user.present?
@providers = Provider.list_for_user(@current_user, Privilege::VIEW)
--
1.7.4.4
12 years, 9 months
[PATCH conductor 1/2] Display quota usage in Provider Accounts
by Tomas Sedovic
From: Tomas Sedovic <tsedovic(a)redhat.com>
https://bugzilla.redhat.com/show_bug.cgi?id=698269
---
.../controllers/provider_accounts_controller.rb | 9 ++++--
src/app/views/provider_accounts/_list.haml | 27 +++++++------------
src/config/locales/en.yml | 5 +++
3 files changed, 21 insertions(+), 20 deletions(-)
diff --git a/src/app/controllers/provider_accounts_controller.rb b/src/app/controllers/provider_accounts_controller.rb
index b797d9e..432e779 100644
--- a/src/app/controllers/provider_accounts_controller.rb
+++ b/src/app/controllers/provider_accounts_controller.rb
@@ -187,9 +187,12 @@ class ProviderAccountsController < ApplicationController
def set_view_vars
#FIXME need to include atributes from credentials, credential_definitions and provider_type in load_accounts query to make it work
@header = [
- { :name => "Name", :sortable => false },
- { :name => "Username", :sortable => false},
- { :name => "Provider Type", :sortable => false }
+ { :name => '', :sortable => false },
+ { :name => t("provider_accounts.index.provider_account_name"), :sortable => false },
+ { :name => t("provider_accounts.index.username"), :sortable => false},
+ { :name => t("provider_accounts.index.provider_type"), :sortable => false },
+ { :name => t("provider_accounts.index.quota_used"), :sortable => false },
+ { :name => t("provider_accounts.index.quota_limit"), :sortable => false },
]
end
diff --git a/src/app/views/provider_accounts/_list.haml b/src/app/views/provider_accounts/_list.haml
index ab16ac3..8327163 100644
--- a/src/app/views/provider_accounts/_list.haml
+++ b/src/app/views/provider_accounts/_list.haml
@@ -7,20 +7,13 @@
- form_tag multi_destroy_provider_accounts_path do
= submit_tag "Delete", :id => 'delete_button', :class => 'button'
- = render :partial => 'layouts/select_all_none'
-
- %table#provider_accounts_table.flat.checkbox_table
- %thead
- %tr
- %th.ignore
- %th= link_to "Provider Account Name", hardware_profiles_path(:sort_by => "name")
- %th= link_to "Username", hardware_profiles_path(:sort_by => "name")
- %th= link_to "Provider Type", hardware_profiles_path(:sort_by => "name")
- - @accounts.each do |account|
- %tr{:class => cycle('nostripe','stripe')}
- %td
- - selected = params[:select] == 'all'
- = check_box_tag "accounts_selected[]", account.id, selected, :id => "account_checkbox_#{account.id}"
- %td= link_to account.name, provider_account_path(account)
- %td= account.credentials_hash['username']
- %td= account.provider.provider_type.name
+ = filter_table(@header, @accounts) do |account|
+ %tr{:class => cycle('nostripe','stripe')}
+ %td
+ - selected = params[:select] == 'all'
+ = check_box_tag "accounts_selected[]", account.id, selected, :id => "account_checkbox_#{account.id}"
+ %td= link_to account.name, provider_account_path(account)
+ %td= account.credentials_hash['username']
+ %td= account.provider.provider_type.name
+ %td= account.quota ? account.quota.percentage_used.to_s + "%": 'unlimited'
+ %td= account.quota.maximum_running_instances or 'unlimited'
diff --git a/src/config/locales/en.yml b/src/config/locales/en.yml
index b76dfa2..25090a0 100644
--- a/src/config/locales/en.yml
+++ b/src/config/locales/en.yml
@@ -192,6 +192,11 @@ en:
provider_accounts:
index:
provider_accounts: Provider Accounts
+ provider_account_name: Provider Account Name
+ username: Username
+ provider_type: Provider Type
+ quota_used: Quota Used
+ quota_limit: Quota Limit
account_deleted:
one: "Account %{list} was deleted."
other: "Accounts %{list} were deleted."
--
1.7.4.4
12 years, 9 months
Failed Login Count bugfix
by Jirka Tomasek
This patchset fixes BZ717780, failed_login_count gets zeroed after
successfull login which is normal authlogic behavior, so to check failed
login count its nessesary to fail login with some testuser and then
login
as admin and see the testuser's failed login count. A test for this is
in second patch.
12 years, 9 months
[PATCH configure 1/2] BZ 715087 - Rename target "rhev-m" to "rhevm" in rhevm.pp
by Richard Su
---
recipes/aeolus/manifests/rhevm.pp | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/recipes/aeolus/manifests/rhevm.pp b/recipes/aeolus/manifests/rhevm.pp
index 84c18c6..7804715 100644
--- a/recipes/aeolus/manifests/rhevm.pp
+++ b/recipes/aeolus/manifests/rhevm.pp
@@ -35,7 +35,7 @@ class aeolus::rhevm inherits aeolus {
port => $rhevm_deltacloud_port}
aeolus::conductor::provider{"rhevm":
- type => "rhev-m",
+ type => "rhevm",
url => "http://localhost:${rhevm_deltacloud_port}/api",
require => [Aeolus::Deltacloud["rhevm"],Aeolus::Conductor::Hwp["rhevm-hwp"]]}
--
1.7.4.4
12 years, 9 months
[PATCH configure 2/2] Rename api-key to username and api-secret to password in /etc/rhevm.json to be compatible with imagefactory 0.2.3
by Richard Su
---
recipes/aeolus/templates/rhevm.json | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/recipes/aeolus/templates/rhevm.json b/recipes/aeolus/templates/rhevm.json
index c32a685..45e6d67 100644
--- a/recipes/aeolus/templates/rhevm.json
+++ b/recipes/aeolus/templates/rhevm.json
@@ -1,12 +1,12 @@
{
"rhevm":
{
- "api-key": "<%= rhevm_deltacloud_username %>",
+ "username": "<%= rhevm_deltacloud_username %>",
"nfs-dir": "<%= rhevm_nfs_mount_point %>",
"nfs-path": "<%= rhevm_nfs_export %>",
"nfs-host": "<%= rhevm_nfs_server %>",
"api-url": "<%= rhevm_deltacloud_powershell_url %>",
- "api-secret": "<%= rhevm_deltacloud_password %>",
+ "password": "<%= rhevm_deltacloud_password %>",
"cluster": "_any_"
}
}
\ No newline at end of file
--
1.7.4.4
12 years, 9 months
Providers in conductor, deltacloud and image_factory
by Mark McLoughlin
Hey,
I started looking at this:
https://www.aeolusproject.org/redmine/issues/1200
"Use deltacloud api for provider names"
but decided to think through things from a higher level again.
I've a fairly jumbled set of notes below, but I'd summarize my
conclusions as:
1) We should move to using a single instance of deltacloud
2) We should drop current provider management UI in Conductor
3) The provider account UI should allow you to supply details of a
RHEV-M or VMWare instance that is not currently known to Conductor
or deltacloud. Or, indeed, choose from any of the known instances.
4) You shouldn't have to re-enter your EC2 credentials for each region
5) Image factory should use the provider/driver details from the
deltacloud API, once some more details are exposed
6) aeolus-image should be able to supply the RHEV-M or VMWare
instance URL to image_factory when doing a push; it gets this URL
from Conductor
7) Similarly, it looks like image_factory requires some other details
for each RHEV-M and VMWare instance. This would need to be in the
'Add Provider Account' dialog and passed by aeolus-image to
image_factory
Meh, that's quite a random set of work items. Anyone have any better
ideas?
Cheers,
Mark.
== Adding Provider Accounts =
In conductor, we need a UI for adding provider accounts.
This should be as straightforward as:
New Provider Account
Provider: [ mock v]
Username: mockuser
Password: ********
[ Add ]
for EC2:
New Provider Account
Provider: [ Amazon EC2 v]
Account number: 1234-5678-1337
Access key: 1DEADBEEF01234567890
Secret access key: ****************************************
Key: [ _________ ] [ Browse ]
Certificate: [ ________ ] [ Browse ]
[ Add ]
for RHEV-M:
New Provider Account
Provider: [ RHEV-M v]
( ) Use existing RHEV-M data center: [ default v]
(x) URL for other RHEV-M data center: http://rhevm.mycorp.com/rhevm-api/
Username: markmc
Domain: rhevm.mycorp.com
Password: ******
[ Add ]
Changes, improvements and rationale:
- When we have a single deltacloud instance for multiple providers, we
can reduce the importance of the "provider" concept in the UI. Only
provider accounts really matter any more
- deltacloud knows about all EC2 regions and automatically exposes a
provider for each one. See the /api/drivers collection and the
configuration in drivers.yaml describing each region/provider
- You only need to enter your credentials once and it is available for
use with all EC2 regions
- We can allow admins to add details of known RHEV-M or VMWare
instances so that they appear as an option. One simple way admins
can do that is by adding the RHEV-M instances as providers in
drivers.yaml, but we should probably have a conductor-level way of
doing it too
- Where deltacloud/conductor doesn't know anything about your RHEV-M
or VMWare instance, you can just enter its URL
- The credentials form is specific to each provider type
= Deltacloud Interface =
Deltacloud has a drivers.yaml file where it stores its knowledge about
different drivers and providers:
---
...
:mock:
:name: Mock
:rhevm:
:name: RHEVM
:entrypoints:
default:
default: "https://rhev-m.localhost:8443/rhevm-api-powershell"
...
:ec2:
:entrypoints:
...
ec2:
us-west-1: ec2.us-west-1.amazonaws.com
ap-southeast-1: ec2.ap-southeast-1.amazonaws.com
eu-west-1: ec2.eu-west-1.amazonaws.com
us-east-1: ec2.us-east-1.amazonaws.com
:name: EC2
Deltacloud can list all the providers it knows about through
the /api/drivers collection:
<drivers>
...
<driver href='http://localhost:3003/api/drivers/ec2' id='ec2'>
<name>EC2</name>
<provider id='us-west-1'></provider>
<provider id='ap-southeast-1'></provider>
<provider id='eu-west-1'></provider>
<provider id='us-east-1'></provider>
</driver>
...
<driver href='http://localhost:3003/api/drivers/rhevm' id='rhevm'>
<name>RHEVM</name>
<provider id='default'></provider>
</driver>
</drivers>
With any deltacloud API call, you should be able to specify the driver
and provider using headers:
X-Deltacloud-Driver: rhevm
X-Deltacloud-Provider: http://rhevm.mycorp.com/rhevm-api/
or matrix params:
GET /api;driver=ec2;provider=us-east-1/instances HTTP/1.1
Work needed:
- It would be nice to see the provider details in the /api/drivers
listing - e.g. the RHEV-M URLs, the EC2 endpoints etc.
- A simple change is needed to support having multiple RHEV-M URLs in
drivers.yaml and exposing them as different providers
- The driver= and provider= matrix params need to be URI encoded so
that we can pass a RHEV-M URL using the param
= Image Factory =
Getting to the original point of all this, image_factory has its own
notion of drivers/provider types/targets and providers.
Much of the information in deltacloud's drivers.yaml could form the
basis for image_factory's knowledge. For a start, we'd stop using
'rhevm' in deltacloud and 'rhev-m' in image_factory.
However, that doesn't account for providers added by Conductor when
deltacloud doesn't already know about the provider.
And finally, it also doesn't account for the other per-provider
knowledge that image_factory has, including:
- For EC2, the boto Location key for a given region:
https://github.com/boto/boto/blob/master/boto/s3/connection.py#L124
- For EC2, the i386 and x86_64 AMIs and AKIs IDs for Fedora 13 and 14
in each region
- For each RHEV-M provider, an NFS host and remote/local paths to use
for doing image uploads
- For VMWare providers, a 'VM host' which is used for image uploads
Some conclusions:
- image_factory doesn't depend on deltacloud right now. However, I
guess that in some far-flung future image_factory should be using
the deltacloud APIs rather than provider specific APIs. Therefore,
we shouldn't be afraid to add a dependency
- The easiest thing would be for image_factory to use deltacloud's
drivers.yaml directly but that's not an API, and may change format.
So, it makes sense that the info that image_factory requires should
from drivers.yaml should be exposed in the api/drivers collection.
- image_factory's other EC2 info should be in a config file, for easy
maintenance (i.e. the AMI/AKI IDs etc.)
- The per RHEV-M and VMWare instance info could be in an
image_factory config file, but we also need to handle the case
where the conductor user has added a provider account for a RHEV-M
instance not in the image_factory config
Perhaps the credentials XML should also contain the provider URL,
as well as the credentials?
- For the RHEV-M NFS details and VMWare 'VM host' details, we need to
consider whether they should be exposed in the conductor 'Add
Provider Account' UI or just in the image_factor config or, even,
automatically detected
12 years, 9 months
[PATCH] Correct %files section of imagefactory.spec.in
by Steven Dake
Added imgfac.1.gz to rpm
Added COPYING to rpm
Added version.txt to rpm
Fixed unowned dirs
Set proper config setting for config file
Signed-off-by: Steven Dake <sdake(a)redhat.com>
---
MANIFEST.in | 2 +-
imagefactory.spec.in | 17 ++++++++++++++---
setup.py | 2 +-
3 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/MANIFEST.in b/MANIFEST.in
index 72f0efc..1ee119c 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1 +1 @@
-include cert-ec2.pem imagefactory.conf scripts/imagefactory
+include COPYING Documentation/man/imgfac.1 cert-ec2.pem imagefactory.conf scripts/imagefactory
diff --git a/imagefactory.spec.in b/imagefactory.spec.in
index b71bbf6..d672ca1 100644
--- a/imagefactory.spec.in
+++ b/imagefactory.spec.in
@@ -37,13 +37,24 @@ for the requested target.
python setup.py build
%install
-python setup.py install -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES
+%{__rm} -rf $RPM_BUILD_ROOT
+python setup.py install -O1 --root=$RPM_BUILD_ROOT
%clean
rm -rf $RPM_BUILD_ROOT
-%files -f INSTALLED_FILES
-%defattr(-,root,root)
+%files
+%defattr(-,root,root,-)
+%doc COPYING version.txt
+%{_initrddir}/imagefactory
+%config(noreplace) %{_sysconfdir}/imagefactory.conf
+%dir %attr(0755, root, root) %{_sysconfdir}/pki/imagefactory/
+%{_sysconfdir}/pki/imagefactory/cert-ec2.pem
+%dir %attr(0755, root, root) %{python_sitelib}/imagefactory/
+%{python_sitelib}/imagefactory/*
+%{python_sitelib}/imagefactory-*.egg-info
+%{_bindir}/imgfac.py
+%{_mandir}/man1/*
%changelog
* Mon Apr 04 2011 Chris Lalancette <clalance(a)redhat.com> - 0.1.6-1
diff --git a/setup.py b/setup.py
index f73ed8e..b54b5d5 100644
--- a/setup.py
+++ b/setup.py
@@ -14,7 +14,7 @@ try:
except Exception, e:
raise RuntimeError("ERROR: version.txt could not be found. Run 'git describe > version.txt' to get the correct version info.")
-datafiles=[('/etc', ['imagefactory.conf']), ('/etc/pki/imagefactory', ['cert-ec2.pem']), ('/etc/rc.d/init.d', ['scripts/imagefactory']), ('', ['version.txt'])]
+datafiles=[('share/man/man1', ['Documentation/man/imgfac.1']), ('/etc', ['imagefactory.conf']), ('/etc/pki/imagefactory', ['cert-ec2.pem']), ('/etc/rc.d/init.d', ['scripts/imagefactory'])]
class sdist(_sdist):
""" custom sdist command to prepare imagefactory.spec file """
--
1.7.4.4
12 years, 9 months
[PATCH] Bug 719055 - Unable to deploy 32-bit Amazon Images
by Scott Seago
t1.micro is ebs-only, but we're not yet doing ebs builds. For now, ignore t1.micro when matching. We'll need to remove this when we get ebs builds working (with corresponding image and HWP modifications so we won't attempt to start s3 instances w/ t1.micro HWP setting).
Signed-off-by: Scott Seago <sseago(a)redhat.com>
---
src/app/models/hardware_profile.rb | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/app/models/hardware_profile.rb b/src/app/models/hardware_profile.rb
index c9a4a14..d0aa105 100644
--- a/src/app/models/hardware_profile.rb
+++ b/src/app/models/hardware_profile.rb
@@ -204,6 +204,12 @@ class HardwareProfile < ActiveRecord::Base
end
def self.match_hardware_profile(front_end_hwp, back_end_hwp)
+ # short-term hack to deal with the fact that t1.micro HWP is
+ # ebs-only, but we don't support ebs yet. Longer-term we'll need
+ # to handle this case explicitly
+ if back_end_hwp.name == "t1.micro"
+ return false
+ end
if back_end_hwp.name == "opaque"
return false
end
--
1.7.4.4
12 years, 9 months
Settings breadcrumbs fix
by Jirka Tomasek
This patch fixes breadcrumbs behavior in Settings in Administration
section. (BZ 719004)
12 years, 9 months