Bump version to 1.0.9; update JSON schemas; add new APIs

This commit is contained in:
Sebastian Thiel
2019-07-05 11:32:35 +08:00
parent 99e97ceece
commit e42ebc0c2b
2442 changed files with 190984 additions and 71186 deletions

View File

@@ -67,6 +67,17 @@ pub fn remove_json_null_values(value: &mut Value) {
map.remove(key);
}
}
json::value::Value::Array(ref mut arr) => {
let mut i = 0;
while i < arr.len() {
if arr[i].is_null() {
arr.remove(i);
} else {
remove_json_null_values(&mut arr[i]);
i += 1;
}
}
}
_ => {}
}
}

View File

@@ -249,6 +249,9 @@ impl<'n> Engine<'n> {
for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() {
let (key, value) = parse_kv_arg(&*parg, err, false);
match key {
"options-requested-policy-version" => {
call = call.options_requested_policy_version(arg_from_str(value.unwrap_or("-0"), err, "options-requested-policy-version", "integer"));
},
_ => {
let mut found = false;
for param in &self.gp {
@@ -262,6 +265,7 @@ impl<'n> Engine<'n> {
err.issues.push(CLIError::UnknownParameter(key.to_string(),
{let mut v = Vec::new();
v.extend(self.gp.iter().map(|v|*v));
v.extend(["options-requested-policy-version"].iter().map(|v|*v));
v } ));
}
}
@@ -672,6 +676,9 @@ impl<'n> Engine<'n> {
for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() {
let (key, value) = parse_kv_arg(&*parg, err, false);
match key {
"options-requested-policy-version" => {
call = call.options_requested_policy_version(arg_from_str(value.unwrap_or("-0"), err, "options-requested-policy-version", "integer"));
},
_ => {
let mut found = false;
for param in &self.gp {
@@ -685,6 +692,7 @@ impl<'n> Engine<'n> {
err.issues.push(CLIError::UnknownParameter(key.to_string(),
{let mut v = Vec::new();
v.extend(self.gp.iter().map(|v|*v));
v.extend(["options-requested-policy-version"].iter().map(|v|*v));
v } ));
}
}
@@ -1342,7 +1350,12 @@ fn main() {
Some(false)),
]),
("get-policy",
Some(r##"Gets the policy for this project. Returns a default
Some(r##"A policy specifies the attestors that must attest to
a container image, before the project is allowed to deploy that
image. There is at most one policy per project. All image admission
requests are permitted if a project has no policy.
Gets the policy for this project. Returns a default
policy if the project does not have one."##),
"Details at http://byron.github.io/google-apis-rs/google_binaryauthorization1_beta1_cli/projects_get-policy",
vec![
@@ -1494,7 +1507,7 @@ fn main() {
let mut app = App::new("binaryauthorization1-beta1")
.author("Sebastian Thiel <byronimo@gmail.com>")
.version("1.0.8+20190322")
.version("1.0.9+20190628")
.about("The management interface for Binary Authorization, a system providing policy control for images deployed to Kubernetes Engine clusters.
")
.after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_binaryauthorization1_beta1_cli")