Skip to content

Commit

Permalink
reduce stuttering
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewjstone committed Jun 6, 2024
1 parent 992b686 commit afc6600
Show file tree
Hide file tree
Showing 54 changed files with 628 additions and 841 deletions.
10 changes: 5 additions & 5 deletions nexus/src/app/address_lot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ impl AddressLot {
AddressLot { datastore }
}

pub fn address_lot_lookup<'a>(
pub fn lookup<'a>(
&'a self,
opctx: &'a OpContext,
address_lot: NameOrId,
Expand All @@ -53,7 +53,7 @@ impl AddressLot {
}
}

pub(crate) async fn address_lot_create(
pub(crate) async fn create(
&self,
opctx: &OpContext,
params: params::AddressLotCreate,
Expand All @@ -63,7 +63,7 @@ impl AddressLot {
self.datastore.address_lot_create(opctx, &params).await
}

pub(crate) async fn address_lot_delete(
pub(crate) async fn delete(
&self,
opctx: &OpContext,
address_lot_lookup: &lookup::AddressLot<'_>,
Expand All @@ -73,7 +73,7 @@ impl AddressLot {
self.datastore.address_lot_delete(opctx, &authz_address_lot).await
}

pub(crate) async fn address_lot_list(
pub(crate) async fn list(
&self,
opctx: &OpContext,
pagparams: &PaginatedBy<'_>,
Expand All @@ -82,7 +82,7 @@ impl AddressLot {
self.datastore.address_lot_list(opctx, pagparams).await
}

pub(crate) async fn address_lot_block_list(
pub(crate) async fn block_list(
&self,
opctx: &OpContext,
address_lot: &lookup::AddressLot<'_>,
Expand Down
7 changes: 2 additions & 5 deletions nexus/src/app/allow_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,15 @@ impl SourceIpAllowList {
}

/// Fetch the allowlist of source IPs that can reach user-facing services.
pub async fn allow_list_view(
&self,
opctx: &OpContext,
) -> Result<AllowList, Error> {
pub async fn view(&self, opctx: &OpContext) -> Result<AllowList, Error> {
self.datastore
.allow_list_view(opctx)
.await
.and_then(AllowList::try_from)
}

/// Upsert the allowlist of source IPs that can reach user-facing services.
pub async fn allow_list_upsert(
pub async fn upsert(
&self,
opctx: &OpContext,
remote_addr: IpAddr,
Expand Down
6 changes: 3 additions & 3 deletions nexus/src/app/bfd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ impl Bfd {
Ok(mg_client)
}

pub async fn bfd_enable(
pub async fn enable(
&self,
opctx: &OpContext,
session: params::BfdSessionEnable,
Expand All @@ -73,7 +73,7 @@ impl Bfd {
Ok(())
}

pub async fn bfd_disable(
pub async fn disable(
&self,
opctx: &OpContext,
session: params::BfdSessionDisable,
Expand All @@ -91,7 +91,7 @@ impl Bfd {
Ok(())
}

pub async fn bfd_status(
pub async fn status(
&self,
_opctx: &OpContext,
) -> Result<Vec<BfdStatus>, Error> {
Expand Down
20 changes: 10 additions & 10 deletions nexus/src/app/bgp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ impl Bgp {
) -> Bgp {
Bgp { log, datastore, internal_resolver }
}
pub async fn bgp_config_set(
pub async fn config_set(
&self,
opctx: &OpContext,
config: &params::BgpConfigCreate,
Expand All @@ -43,7 +43,7 @@ impl Bgp {
Ok(result)
}

pub async fn bgp_config_get(
pub async fn config_get(
&self,
opctx: &OpContext,
name_or_id: NameOrId,
Expand All @@ -52,7 +52,7 @@ impl Bgp {
self.datastore.bgp_config_get(opctx, &name_or_id).await
}

pub async fn bgp_config_list(
pub async fn config_list(
&self,
opctx: &OpContext,
pagparams: &PaginatedBy<'_>,
Expand All @@ -61,7 +61,7 @@ impl Bgp {
self.datastore.bgp_config_list(opctx, pagparams).await
}

pub async fn bgp_config_delete(
pub async fn config_delete(
&self,
opctx: &OpContext,
sel: &params::BgpConfigSelector,
Expand All @@ -71,7 +71,7 @@ impl Bgp {
Ok(result)
}

pub async fn bgp_create_announce_set(
pub async fn create_announce_set(
&self,
opctx: &OpContext,
announce: &params::BgpAnnounceSetCreate,
Expand All @@ -82,7 +82,7 @@ impl Bgp {
Ok(result)
}

pub async fn bgp_announce_list(
pub async fn announce_list(
&self,
opctx: &OpContext,
sel: &params::BgpAnnounceSetSelector,
Expand All @@ -91,7 +91,7 @@ impl Bgp {
self.datastore.bgp_announce_list(opctx, sel).await
}

pub async fn bgp_delete_announce_set(
pub async fn delete_announce_set(
&self,
opctx: &OpContext,
sel: &params::BgpAnnounceSetSelector,
Expand All @@ -101,7 +101,7 @@ impl Bgp {
Ok(result)
}

pub async fn bgp_peer_status(
pub async fn peer_status(
&self,
opctx: &OpContext,
) -> ListResultVec<BgpPeerStatus> {
Expand Down Expand Up @@ -162,7 +162,7 @@ impl Bgp {
Ok(result)
}

pub async fn bgp_message_history(
pub async fn message_history(
&self,
opctx: &OpContext,
sel: &params::BgpRouteSelector,
Expand Down Expand Up @@ -205,7 +205,7 @@ impl Bgp {
Ok(result)
}

pub async fn bgp_imported_routes_ipv4(
pub async fn imported_routes_ipv4(
&self,
opctx: &OpContext,
sel: &params::BgpRouteSelector,
Expand Down
10 changes: 5 additions & 5 deletions nexus/src/app/certificate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ impl Certificate {
) -> Certificate {
Certificate { datastore, background_tasks, silo, opctx_external_authn }
}
pub fn certificate_lookup<'a>(
pub fn lookup<'a>(
&'a self,
opctx: &'a OpContext,
certificate: &'a NameOrId,
Expand All @@ -57,7 +57,7 @@ impl Certificate {
}
}

pub(crate) async fn certificate_create(
pub(crate) async fn create(
&self,
opctx: &OpContext,
params: params::CertificateCreate,
Expand All @@ -82,7 +82,7 @@ impl Certificate {
// name(s)).
let silo_fq_dns_names = self
.silo
.silo_fq_dns_names(&self.opctx_external_authn, authz_silo.id())
.fq_dns_names(&self.opctx_external_authn, authz_silo.id())
.await?;

let kind = params.service;
Expand All @@ -109,15 +109,15 @@ impl Certificate {
}
}

pub(crate) async fn certificates_list(
pub(crate) async fn list(
&self,
opctx: &OpContext,
pagparams: &PaginatedBy<'_>,
) -> ListResultVec<db::model::Certificate> {
self.datastore.certificate_list_for(opctx, None, pagparams, true).await
}

pub(crate) async fn certificate_delete(
pub(crate) async fn delete(
&self,
opctx: &OpContext,
certificate_lookup: lookup::Certificate<'_>,
Expand Down
Loading

0 comments on commit afc6600

Please sign in to comment.