-
Notifications
You must be signed in to change notification settings - Fork 111
feat: Changes to svpc/dpa to allow Spectrum X partitioning and allow … #1791
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
d02982b
feat: Changes to svpc/dpa to allow Spectrum X partitioning and allow …
srinivasadmurthy e21224a
Merge remote-tracking branch 'remotes/origin/main' into sdmworkv3
srinivasadmurthy c7f7a37
feat: Changes to svpc/dpa to allow Spectrum X partitioning and allow …
srinivasadmurthy cc4af53
feat: Changes to svpc/dpa to allow Spectrum X partitioning and allow …
srinivasadmurthy d9c1d7b
Merge remote-tracking branch 'remotes/origin/main' into sdmworkv3
srinivasadmurthy dede385
Merge remote-tracking branch 'remotes/origin/main' into sdmworkv3
srinivasadmurthy dd6387f
Merge remote-tracking branch 'remotes/origin/main' into sdmworkv3
srinivasadmurthy f6bab73
feat: Changes to svpc/dpa to allow Spectrum X partitioning and allow …
srinivasadmurthy e18e0cd
Merge remote-tracking branch 'remotes/origin/main' into sdmworkv3
srinivasadmurthy 4b4e044
Merge remote-tracking branch 'remotes/origin/main' into sdmworkv3
srinivasadmurthy bfa9b23
Merge remote-tracking branch 'remotes/origin/main' into sdmworkv3
srinivasadmurthy 5712100
Merge remote-tracking branch 'remotes/origin/main' into sdmworkv3
srinivasadmurthy 6d1b0fa
Merge remote-tracking branch 'remotes/origin/main' into sdmworkv3
srinivasadmurthy 2b0006d
feat: Changes to svpc/dpa to allow Spectrum X partitioning and allow …
srinivasadmurthy e8b22ac
Merge remote-tracking branch 'remotes/origin/main' into sdmworkv3
srinivasadmurthy 9f47a29
Merge remote-tracking branch 'remotes/origin/main' into sdmworkv3
srinivasadmurthy 17b6c32
feat: Changes to svpc/dpa to allow Spectrum X partitioning and allow …
srinivasadmurthy 4f1fa5e
feat: Changes to svpc/dpa to allow Spectrum X partitioning and allow …
srinivasadmurthy a80a37f
Merge remote-tracking branch 'remotes/origin/main' into sdmworkv3
srinivasadmurthy 2af6c5b
Merge remote-tracking branch 'remotes/origin/main' into sdmworkv3
srinivasadmurthy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,33 @@ | ||
| /* | ||
| * SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| use carbide_uuid::instance::InstanceId; | ||
| use clap::Parser; | ||
| use rpc::forge::InstanceSpxConfig; | ||
|
|
||
| #[derive(Parser, Debug)] | ||
| pub struct Args { | ||
| #[clap(short, long, required(true))] | ||
| pub instance: InstanceId, | ||
| #[clap( | ||
| long, | ||
| required(true), | ||
| help = "SPX configuration in JSON format", | ||
| value_name = "SPX_JSON" | ||
| )] | ||
| pub config: InstanceSpxConfig, | ||
| } |
This file contains hidden or 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,57 @@ | ||
| /* | ||
| * SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| use super::args::Args; | ||
| use crate::errors::{CarbideCliError, CarbideCliResult}; | ||
| use crate::instance::common::GlobalOptions; | ||
| use crate::rpc::ApiClient; | ||
|
|
||
| pub async fn update_spx_config( | ||
| api_client: &ApiClient, | ||
| update_request: Args, | ||
| opts: GlobalOptions<'_>, | ||
| ) -> CarbideCliResult<()> { | ||
| if opts.cloud_unsafe_op.is_none() { | ||
| return Err(CarbideCliError::GenericError( | ||
| "Operation not allowed due to potential inconsistencies with cloud database." | ||
| .to_owned(), | ||
| )); | ||
| } | ||
|
|
||
| match api_client | ||
| .update_instance_config_with( | ||
| update_request.instance, | ||
| |config| { | ||
| config.spxconfig = Some(update_request.config); | ||
| }, | ||
| |_metadata| {}, | ||
| opts.cloud_unsafe_op, | ||
| ) | ||
| .await | ||
| { | ||
| Ok(i) => { | ||
| tracing::info!( | ||
| "update-spx-config was successful. Updated instance: {:?}", | ||
| i | ||
| ); | ||
| } | ||
| Err(e) => { | ||
| tracing::info!("update-spx-config failed with {} ", e); | ||
| } | ||
| }; | ||
| Ok(()) | ||
| } | ||
This file contains hidden or 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,43 @@ | ||
| /* | ||
| * SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| pub mod args; | ||
| pub mod cmd; | ||
|
|
||
| pub use args::Args; | ||
|
|
||
| use super::common::GlobalOptions; | ||
| use crate::cfg::run::Run; | ||
| use crate::cfg::runtime::RuntimeContext; | ||
| use crate::errors::CarbideCliResult; | ||
|
|
||
| impl Run for Args { | ||
| async fn run(self, ctx: &mut RuntimeContext) -> CarbideCliResult<()> { | ||
| let opts = GlobalOptions { | ||
| format: ctx.config.format, | ||
| page_size: ctx.config.page_size, | ||
| sort_by: &ctx.config.sort_by, | ||
| cloud_unsafe_op: if ctx.config.cloud_unsafe_op_enabled { | ||
| Some("enabled".to_string()) | ||
| } else { | ||
| None | ||
| }, | ||
| }; | ||
| cmd::update_spx_config(&ctx.api_client, self, opts).await?; | ||
| Ok(()) | ||
| } | ||
| } |
This file contains hidden or 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 hidden or 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 hidden or 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,31 @@ | ||
| /* | ||
| * SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| mod show; | ||
|
|
||
| #[cfg(test)] | ||
| mod tests; | ||
|
|
||
| use clap::Parser; | ||
|
|
||
| use crate::cfg::dispatch::Dispatch; | ||
|
|
||
| #[derive(Parser, Debug, Dispatch)] | ||
| pub enum Cmd { | ||
| #[clap(about = "Display SpectrumX Partition information")] | ||
| Show(show::Args), | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.