Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Model allocations #7114
Conversation
alesstimec
approved these changes
Mar 20, 2017
LGTM modulo a few conceptual questions..
| + return budget.NewClient(bakeryClient) | ||
| +} | ||
| + | ||
| +type BudgetAPIClient interface { |
| return &cmd.Info{ | ||
| Name: "allocate", | ||
| - Args: "<budget>:<value> <application> [<application2> ...]", | ||
| - Purpose: "Allocate budget to applications.", | ||
| + Args: "<value>", |
alesstimec
Mar 20, 2017
Member
do we not allow changing the budget as well? Moving an allocation from one budget to another? we used to have : as an argument...
| - s.mockAPI.resp = "allocation updated" | ||
| - ctx, err := s.run(c, "name:100", "db") | ||
| +func (s *updateAllocationSuite) TestUpdateAllocation(c *gc.C) { | ||
| + s.mockAPI.resp = "budget set to 5" |
| - c.Services = args[1:] | ||
| - return nil | ||
| +func (c *updateAllocationCommand) modelUUID() (string, error) { |
wallyworld
Mar 21, 2017
Owner
this would be nice as a method on ModelCommandBase
i wonder if there's a helper there already?
| @@ -136,31 +135,14 @@ func formatTabular(writer io.Writer, value interface{}) error { | ||
| table.RightAlign(col) | ||
| } | ||
| - table.AddRow("MODEL", "SERVICES", "SPENT", "ALLOCATED", "BY", "USAGE") | ||
| + table.AddRow("MODEL", "SPENT", "ALLOCATED", "BY", "USAGE") |
|
$$merge$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
|
Build failed: Tests failed |
|
@tasdomas Test failures are legit:
|
|
$$merge$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
jujubot
merged commit 21f5245
into
juju:rising-sun
Mar 21, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
tasdomas commentedMar 16, 2017
Description of change
This changes the behavior of juju commands that manage budgets and allocations.
The
juju update-allocationcommand is removed. Thejuju allocatecommand now allows to change allocations associated with models, not applications. Thejuju show-budgetcommand also no longer provides per-application break-down of usage.This change is needed to implement the changed approach to managing budgets in juju models.
QA steps
After creating a juju model, run
juju sla standard --budget 500. Then runjuju allocate 1000.The output of
juju show-budgetshould reflect that the allocation of the current model is 1000.Documentation changes
This change will need to be documented along with juju sla support.
Bug reference
None.