-
Notifications
You must be signed in to change notification settings - Fork 937
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
logging rate limits flag introduction (#2313)
* Feat: create and update org quotas with log volume (#2298) * Show org and space quotas (#2299) * org-quota and space-quota now show log volume * code currently assumes responses with log limits. Consider backward compatibility before shipping. * add log volume to space-quotas and org-quotas commands * will show "unlimited" for old CC API's which is technically correct * Fix unit tests in ccv3 * Create and update space quotas (#2300) * create-space-quota accepts log volume flag * update-space-quota accepts log volume flag * Update create-space-quota flag description * Make it clear that the log volume measured is in bytes rather than log lines. * Push and scale app and run-task * Bump rack from 2.2.3 to 2.2.3.1 in /fixtures/applications/example-app * `cf push` command accepts log rate limit flag * since `cf push` uses manifests this commit also adds support for log rate limit in manifests * `cf scale` command accepts log rate limit flag * app summary displayer can now handle rendering log rate and log rate limit metrics for running instances * app summaries will show `0 of 0` if the cloud controller does not support log rate limit container metrics * `cf run-task` command accepts log rate limit flag * update help text to suggest using ='s with -1 to avoid flag parsing problem * Flag parser accepts 0B, -1B, 0T, etc for flags * this affects non-manifest based commands * Extract constants for instance stats columns * Extract constant for column count Co-authored-by: Carson Long <lcarson@vmware.com> Co-authored-by: Matthew Kocher <mkocher@vmware.com> Co-authored-by: Rebecca Roberts <robertsre@vmware.com> Co-authored-by: Benjamin Fuller <Benjamintf1@gmail.com>
- Loading branch information
1 parent
6715868
commit 94619ee
Showing
70 changed files
with
1,382 additions
and
318 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package v7pushaction | ||
|
||
import ( | ||
"code.cloudfoundry.org/cli/command/translatableerror" | ||
"code.cloudfoundry.org/cli/util/manifestparser" | ||
) | ||
|
||
func HandleLogRateLimitOverride(manifest manifestparser.Manifest, overrides FlagOverrides) (manifestparser.Manifest, error) { | ||
if overrides.LogRateLimit != "" { | ||
if manifest.ContainsMultipleApps() { | ||
return manifest, translatableerror.CommandLineArgsWithMultipleAppsError{} | ||
} | ||
|
||
webProcess := manifest.GetFirstAppWebProcess() | ||
if webProcess != nil { | ||
webProcess.LogRateLimit = overrides.LogRateLimit | ||
} else { | ||
app := manifest.GetFirstApp() | ||
app.LogRateLimit = overrides.LogRateLimit | ||
} | ||
} | ||
|
||
return manifest, nil | ||
} |
Oops, something went wrong.