Skip to content

Commit 4cbd259

Browse files
authored
Revert "feat(apm): add service remapping CRUD commands"
1 parent aeb556b commit 4cbd259

4 files changed

Lines changed: 1 addition & 472 deletions

File tree

src/auth/types.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ pub fn default_scopes() -> Vec<&'static str> {
103103
// APM
104104
"apm_read",
105105
"apm_service_catalog_read",
106-
"apm_service_renaming_write",
107106
// Audit
108107
"audit_logs_read",
109108
// Azure
@@ -265,7 +264,7 @@ mod tests {
265264
#[test]
266265
fn test_default_scopes() {
267266
let scopes = default_scopes();
268-
assert_eq!(scopes.len(), 83);
267+
assert_eq!(scopes.len(), 82);
269268
assert!(scopes.contains(&"dashboards_read"));
270269
assert!(scopes.contains(&"monitors_read"));
271270
assert!(scopes.contains(&"logs_read_data"));
@@ -278,7 +277,6 @@ mod tests {
278277
assert!(scopes.contains(&"ci_visibility_read"));
279278
assert!(scopes.contains(&"teams_read"));
280279
assert!(scopes.contains(&"apm_service_catalog_read"));
281-
assert!(scopes.contains(&"apm_service_renaming_write"));
282280
assert!(scopes.contains(&"status_pages_settings_read"));
283281
assert!(scopes.contains(&"on_call_read"));
284282
assert!(scopes.contains(&"on_call_write"));

src/client.rs

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -952,33 +952,6 @@ pub async fn raw_post_jsonapi(
952952
Ok(resp.json().await?)
953953
}
954954

955-
pub async fn raw_put(
956-
cfg: &Config,
957-
path: &str,
958-
body: serde_json::Value,
959-
) -> anyhow::Result<serde_json::Value> {
960-
let url = format!("{}{}", cfg.api_base_url(), path);
961-
let client = reqwest::Client::new();
962-
let req = client.put(&url);
963-
let req = apply_auth(req, cfg, "PUT", path)?;
964-
let resp = req
965-
.header("Content-Type", "application/json")
966-
.header("Accept", "application/json")
967-
.header("User-Agent", useragent::get())
968-
.json(&body)
969-
.send()
970-
.await?;
971-
if resp.status() == reqwest::StatusCode::NO_CONTENT {
972-
return Ok(serde_json::Value::Null);
973-
}
974-
if !resp.status().is_success() {
975-
let status = resp.status();
976-
let body = resp.text().await.unwrap_or_default();
977-
anyhow::bail!("PUT {url} failed (HTTP {status}): {body}");
978-
}
979-
Ok(resp.json().await?)
980-
}
981-
982955
/// Like `raw_post`, but returns the parsed JSON body even on non-2xx responses.
983956
/// Callers are responsible for inspecting the body for errors.
984957
pub async fn raw_post_lenient(

0 commit comments

Comments
 (0)