-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat/platform orchestrator stage 2 (#245)
* add platform-orchestrator canister * user_index canister changes * individual_user canister changes * added platform orchestrator * chore: refactor and fixes * fix: new user signups * user_index stage 1 upgrade * update upgrade local canister script * remove sns * fix nix file * Revert "user_index stage 1 upgrade" This reverts commit 139d685. * chore: refactor * update github workflows * feat: add last subnet upgrade status in platform orchestrator canister * update cycle constants * added get_cycle_balance in post_cache * added get_next_available_subnet in platform_orchestrator * chore: fix platform orchestrator * fix: upgrade individual canisters for not yet assigned canisters * added existing subnet_orchestrator and post_cache to plaform_orchestrator
- Loading branch information
1 parent
f70c12a
commit ad9d076
Showing
21 changed files
with
121 additions
and
82 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
13 changes: 13 additions & 0 deletions
13
...ister/platform_orchestrator/src/api/canister_management/get_last_subnet_upgrade_status.rs
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,13 @@ | ||
use candid::candid_method; | ||
|
||
use crate::{data_model::CanisterUpgradeStatus, CANISTER_DATA}; | ||
|
||
|
||
|
||
#[candid_method(query)] | ||
#[ic_cdk::query] | ||
pub fn get_subnet_last_upgrade_status() -> CanisterUpgradeStatus { | ||
CANISTER_DATA.with_borrow(|canister_data| { | ||
canister_data.last_subnet_canister_upgrade_status.clone() | ||
}) | ||
} |
13 changes: 13 additions & 0 deletions
13
src/canister/platform_orchestrator/src/api/canister_management/get_next_available_subnet.rs
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,13 @@ | ||
use candid::Principal; | ||
|
||
use crate::CANISTER_DATA; | ||
|
||
|
||
|
||
#[ic_cdk::query] | ||
#[candid::candid_method(query)] | ||
fn get_next_available_subnet() -> Principal { | ||
CANISTER_DATA.with_borrow(|canister_data| { | ||
*canister_data.subet_orchestrator_with_capacity_left.iter().next().unwrap() | ||
}) | ||
} |
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
9 changes: 9 additions & 0 deletions
9
src/canister/post_cache/src/api/canister_management/get_cycle_balance.rs
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,9 @@ | ||
use ic_cdk::api; | ||
|
||
|
||
|
||
#[ic_cdk::query] | ||
#[candid::candid_method(query)] | ||
fn get_cycle_balance() -> u128 { | ||
api::canister_balance128() | ||
} |
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 @@ | ||
pub mod get_cycle_balance; |
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
Oops, something went wrong.