MCPcopy Create free account
hub / github.com/chirpstack/chirpstack / create_tenant

Function create_tenant

chirpstack/src/storage/tenant.rs:696–712  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

694 }
695
696 pub async fn create_tenant() -> Tenant {
697 let t = Tenant {
698 id: Uuid::new_v4().into(),
699 created_at: Utc::now().round_subsecs(1),
700 updated_at: Utc::now().round_subsecs(1),
701 name: "test t".into(),
702 description: "test description".into(),
703 can_have_gateways: true,
704 max_device_count: 20,
705 max_gateway_count: 10,
706 private_gateways_up: true,
707 private_gateways_down: true,
708 tags: fields::KeyValue::new(HashMap::new()),
709 dev_addr_prefixes: fields::DevAddrPrefixVec::new(vec![]),
710 };
711 create(t).await.unwrap()
712 }
713
714 #[tokio::test]
715 async fn test_tenant() {

Callers 11

create_applicationFunction · 0.85
test_tenantFunction · 0.85
test_tenant_userFunction · 0.85
create_api_keyFunction · 0.85
create_device_profileFunction · 0.85
create_gatewayFunction · 0.85
validate_tenantFunction · 0.85
tenant_userFunction · 0.85
applicationFunction · 0.85
device_profileFunction · 0.85
gatewayFunction · 0.85

Calls 3

unwrapMethod · 0.80
createFunction · 0.70
intoMethod · 0.45

Tested by 2

test_tenantFunction · 0.68
test_tenant_userFunction · 0.68