Skip to content

Commit

Permalink
Use prelude to simplify imports to kubernetes_api_objects (#285)
Browse files Browse the repository at this point in the history
Signed-off-by: Xudong Sun <[email protected]>
  • Loading branch information
marshtompsxd authored Sep 20, 2023
1 parent 5f1f7f7 commit 5220708
Show file tree
Hide file tree
Showing 33 changed files with 113 additions and 182 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
// SPDX-License-Identifier: MIT
#![allow(unused_imports)]
use crate::kubernetes_api_objects::{
api_method::*, common::*, config_map::*, container::*, dynamic::*, error::*, label_selector::*,
object_meta::*, persistent_volume_claim::*, pod::*, pod_template_spec::*, resource::*,
resource_requirements::*, service::*, stateful_set::*, volume::*,
container::*, error::*, label_selector::*, pod_template_spec::*, prelude::*,
resource_requirements::*, volume::*,
};
use crate::kubernetes_cluster::spec::message::*;
use crate::pervasive_ext::string_map::*;
Expand Down
10 changes: 6 additions & 4 deletions src/kubernetes_api_objects/api_method.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
// Copyright 2022 VMware, Inc.
// SPDX-License-Identifier: MIT
use crate::kubernetes_api_objects::api_resource::*;
use crate::kubernetes_api_objects::common::{Kind, ObjectRef};
use crate::kubernetes_api_objects::dynamic::*;
use crate::kubernetes_api_objects::error::*;
use crate::kubernetes_api_objects::{
api_resource::*,
common::{Kind, ObjectRef},
dynamic::*,
error::*,
};
use crate::pervasive_ext::string_view::*;
use vstd::prelude::*;
use vstd::string::*;
Expand Down
12 changes: 4 additions & 8 deletions src/kubernetes_api_objects/cluster_role.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
// Copyright 2022 VMware, Inc.
// SPDX-License-Identifier: MIT
use crate::kubernetes_api_objects::api_resource::*;
use crate::kubernetes_api_objects::common::*;
use crate::kubernetes_api_objects::dynamic::*;
use crate::kubernetes_api_objects::error::ParseDynamicObjectError;
use crate::kubernetes_api_objects::marshal::*;
use crate::kubernetes_api_objects::object_meta::*;
use crate::kubernetes_api_objects::resource::*;
use crate::kubernetes_api_objects::role::*;
use crate::kubernetes_api_objects::{
api_resource::*, common::*, dynamic::*, error::ParseDynamicObjectError, marshal::*,
object_meta::*, resource::*, role::*,
};
use crate::pervasive_ext::string_map::StringMap;
use crate::pervasive_ext::string_view::StringView;
use vstd::prelude::*;
Expand Down
12 changes: 4 additions & 8 deletions src/kubernetes_api_objects/cluster_role_binding.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
// Copyright 2022 VMware, Inc.
// SPDX-License-Identifier: MIT
use crate::kubernetes_api_objects::api_resource::*;
use crate::kubernetes_api_objects::common::*;
use crate::kubernetes_api_objects::dynamic::*;
use crate::kubernetes_api_objects::error::ParseDynamicObjectError;
use crate::kubernetes_api_objects::marshal::*;
use crate::kubernetes_api_objects::object_meta::*;
use crate::kubernetes_api_objects::resource::*;
use crate::kubernetes_api_objects::role_binding::*;
use crate::kubernetes_api_objects::{
api_resource::*, common::*, dynamic::*, error::ParseDynamicObjectError, marshal::*,
object_meta::*, resource::*, role_binding::*,
};
use crate::pervasive_ext::string_map::StringMap;
use crate::pervasive_ext::string_view::StringView;
use vstd::prelude::*;
Expand Down
11 changes: 4 additions & 7 deletions src/kubernetes_api_objects/config_map.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
// Copyright 2022 VMware, Inc.
// SPDX-License-Identifier: MIT
use crate::kubernetes_api_objects::api_resource::*;
use crate::kubernetes_api_objects::common::*;
use crate::kubernetes_api_objects::dynamic::*;
use crate::kubernetes_api_objects::error::ParseDynamicObjectError;
use crate::kubernetes_api_objects::marshal::*;
use crate::kubernetes_api_objects::object_meta::*;
use crate::kubernetes_api_objects::resource::*;
use crate::kubernetes_api_objects::{
api_resource::*, common::*, dynamic::*, error::ParseDynamicObjectError, marshal::*,
object_meta::*, resource::*,
};
use crate::pervasive_ext::string_map::*;
use crate::pervasive_ext::string_view::*;
use vstd::prelude::*;
Expand Down
9 changes: 3 additions & 6 deletions src/kubernetes_api_objects/container.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
// Copyright 2022 VMware, Inc.
// SPDX-License-Identifier: MIT
use crate::kubernetes_api_objects::api_resource::*;
use crate::kubernetes_api_objects::common::*;
use crate::kubernetes_api_objects::dynamic::*;
use crate::kubernetes_api_objects::marshal::*;
use crate::kubernetes_api_objects::resource::*;
use crate::kubernetes_api_objects::resource_requirements::*;
use crate::kubernetes_api_objects::{
api_resource::*, common::*, dynamic::*, marshal::*, resource::*, resource_requirements::*,
};
use crate::pervasive_ext::string_view::*;
use vstd::prelude::*;
use vstd::seq_lib::*;
Expand Down
13 changes: 4 additions & 9 deletions src/kubernetes_api_objects/daemon_set.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
// Copyright 2022 VMware, Inc.
// SPDX-License-Identifier: MIT
use crate::kubernetes_api_objects::api_resource::*;
use crate::kubernetes_api_objects::common::*;
use crate::kubernetes_api_objects::dynamic::*;
use crate::kubernetes_api_objects::error::ParseDynamicObjectError;
use crate::kubernetes_api_objects::label_selector::*;
use crate::kubernetes_api_objects::marshal::*;
use crate::kubernetes_api_objects::object_meta::*;
use crate::kubernetes_api_objects::pod_template_spec::*;
use crate::kubernetes_api_objects::resource::*;
use crate::kubernetes_api_objects::{
api_resource::*, common::*, dynamic::*, error::ParseDynamicObjectError, label_selector::*,
marshal::*, object_meta::*, pod_template_spec::*, resource::*,
};
use crate::pervasive_ext::string_map::*;
use crate::pervasive_ext::string_view::*;
use vstd::prelude::*;
Expand Down
5 changes: 1 addition & 4 deletions src/kubernetes_api_objects/dynamic.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
// Copyright 2022 VMware, Inc.
// SPDX-License-Identifier: MIT
use crate::kubernetes_api_objects::common::*;
use crate::kubernetes_api_objects::marshal::*;
use crate::kubernetes_api_objects::object_meta::*;
use crate::kubernetes_api_objects::resource::*;
use crate::kubernetes_api_objects::{common::*, marshal::*, object_meta::*, resource::*};
use crate::pervasive_ext::string_view::*;
use vstd::prelude::*;

Expand Down
3 changes: 1 addition & 2 deletions src/kubernetes_api_objects/error.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright 2022 VMware, Inc.
// SPDX-License-Identifier: MIT
use crate::kubernetes_api_objects::common::*;
use crate::kubernetes_api_objects::object_meta::*;
use crate::kubernetes_api_objects::{common::*, object_meta::*};
use deps_hack::kube;
use vstd::prelude::*;

Expand Down
7 changes: 3 additions & 4 deletions src/kubernetes_api_objects/label_selector.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
// Copyright 2022 VMware, Inc.
// SPDX-License-Identifier: MIT
use crate::kubernetes_api_objects::dynamic::*;
use crate::kubernetes_api_objects::error::ParseDynamicObjectError;
use crate::kubernetes_api_objects::marshal::*;
use crate::kubernetes_api_objects::resource::*;
use crate::kubernetes_api_objects::{
common::*, error::ParseDynamicObjectError, marshal::*, resource::*,
};
use crate::pervasive_ext::string_map::*;
use crate::pervasive_ext::string_view::*;
use vstd::prelude::*;
Expand Down
1 change: 1 addition & 0 deletions src/kubernetes_api_objects/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ pub mod owner_reference;
pub mod persistent_volume_claim;
pub mod pod;
pub mod pod_template_spec;
pub mod prelude;
pub mod resource;
pub mod resource_requirements;
pub mod role;
Expand Down
8 changes: 3 additions & 5 deletions src/kubernetes_api_objects/object_meta.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
// Copyright 2022 VMware, Inc.
// SPDX-License-Identifier: MIT
use crate::kubernetes_api_objects::common::*;
use crate::kubernetes_api_objects::error::ParseDynamicObjectError;
use crate::kubernetes_api_objects::marshal::*;
use crate::kubernetes_api_objects::owner_reference::*;
use crate::kubernetes_api_objects::resource::*;
use crate::kubernetes_api_objects::{
common::*, error::ParseDynamicObjectError, marshal::*, owner_reference::*, resource::*,
};
use crate::pervasive_ext::string_map::*;
use crate::pervasive_ext::string_view::*;
use vstd::prelude::*;
Expand Down
7 changes: 3 additions & 4 deletions src/kubernetes_api_objects/owner_reference.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
// Copyright 2022 VMware, Inc.
// SPDX-License-Identifier: MIT
use crate::kubernetes_api_objects::common::*;
use crate::kubernetes_api_objects::error::ParseDynamicObjectError;
use crate::kubernetes_api_objects::marshal::*;
use crate::kubernetes_api_objects::resource::*;
use crate::kubernetes_api_objects::{
common::*, error::ParseDynamicObjectError, marshal::*, resource::*,
};
use crate::pervasive_ext::string_map::*;
use crate::pervasive_ext::string_view::*;
use vstd::prelude::*;
Expand Down
12 changes: 4 additions & 8 deletions src/kubernetes_api_objects/persistent_volume_claim.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
// Copyright 2022 VMware, Inc.
// SPDX-License-Identifier: MIT
use crate::kubernetes_api_objects::api_resource::*;
use crate::kubernetes_api_objects::common::*;
use crate::kubernetes_api_objects::dynamic::*;
use crate::kubernetes_api_objects::error::ParseDynamicObjectError;
use crate::kubernetes_api_objects::marshal::*;
use crate::kubernetes_api_objects::object_meta::*;
use crate::kubernetes_api_objects::resource::*;
use crate::kubernetes_api_objects::resource_requirements::*;
use crate::kubernetes_api_objects::{
api_resource::*, common::*, dynamic::*, error::ParseDynamicObjectError, marshal::*,
object_meta::*, resource::*, resource_requirements::*,
};
use crate::pervasive_ext::string_view::*;
use vstd::prelude::*;
use vstd::seq_lib::*;
Expand Down
17 changes: 5 additions & 12 deletions src/kubernetes_api_objects/pod.rs
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
// Copyright 2022 VMware, Inc.
// SPDX-License-Identifier: MIT
use crate::kubernetes_api_objects::affinity::*;
use crate::kubernetes_api_objects::api_resource::*;
use crate::kubernetes_api_objects::common::*;
use crate::kubernetes_api_objects::container::*;
use crate::kubernetes_api_objects::dynamic::*;
use crate::kubernetes_api_objects::error::ParseDynamicObjectError;
use crate::kubernetes_api_objects::marshal::*;
use crate::kubernetes_api_objects::object_meta::*;
use crate::kubernetes_api_objects::resource::*;
use crate::kubernetes_api_objects::resource_requirements::*;
use crate::kubernetes_api_objects::toleration::*;
use crate::kubernetes_api_objects::volume::*;
use crate::kubernetes_api_objects::{
affinity::*, api_resource::*, common::*, container::*, dynamic::*,
error::ParseDynamicObjectError, marshal::*, object_meta::*, resource::*,
resource_requirements::*, toleration::*, volume::*,
};
use crate::pervasive_ext::{string_map::*, string_view::*};
use vstd::prelude::*;
use vstd::seq_lib::*;
Expand Down
12 changes: 4 additions & 8 deletions src/kubernetes_api_objects/pod_template_spec.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
// Copyright 2022 VMware, Inc.
// SPDX-License-Identifier: MIT
use crate::kubernetes_api_objects::api_resource::*;
use crate::kubernetes_api_objects::common::*;
use crate::kubernetes_api_objects::dynamic::*;
use crate::kubernetes_api_objects::error::ParseDynamicObjectError;
use crate::kubernetes_api_objects::marshal::*;
use crate::kubernetes_api_objects::object_meta::*;
use crate::kubernetes_api_objects::pod::*;
use crate::kubernetes_api_objects::resource::*;
use crate::kubernetes_api_objects::{
api_resource::*, common::*, dynamic::*, error::ParseDynamicObjectError, marshal::*,
object_meta::*, pod::*, resource::*,
};
use crate::pervasive_ext::string_view::*;
use vstd::prelude::*;
use vstd::seq_lib::*;
Expand Down
19 changes: 19 additions & 0 deletions src/kubernetes_api_objects/prelude.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Copyright 2022 VMware, Inc.
// SPDX-License-Identifier: MIT
pub use crate::kubernetes_api_objects::api_method::*;
pub use crate::kubernetes_api_objects::common::*;
pub use crate::kubernetes_api_objects::config_map::*;
pub use crate::kubernetes_api_objects::daemon_set::*;
pub use crate::kubernetes_api_objects::dynamic::*;
pub use crate::kubernetes_api_objects::marshal::*;
pub use crate::kubernetes_api_objects::object_meta::*;
pub use crate::kubernetes_api_objects::owner_reference::*;
pub use crate::kubernetes_api_objects::persistent_volume_claim::*;
pub use crate::kubernetes_api_objects::pod::*;
pub use crate::kubernetes_api_objects::resource::*;
pub use crate::kubernetes_api_objects::role::*;
pub use crate::kubernetes_api_objects::role_binding::*;
pub use crate::kubernetes_api_objects::secret::*;
pub use crate::kubernetes_api_objects::service::*;
pub use crate::kubernetes_api_objects::service_account::*;
pub use crate::kubernetes_api_objects::stateful_set::*;
8 changes: 3 additions & 5 deletions src/kubernetes_api_objects/resource.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
// Copyright 2022 VMware, Inc.
// SPDX-License-Identifier: MIT
use crate::kubernetes_api_objects::common::*;
use crate::kubernetes_api_objects::dynamic::*;
use crate::kubernetes_api_objects::error::ParseDynamicObjectError;
use crate::kubernetes_api_objects::marshal::*;
use crate::kubernetes_api_objects::object_meta::*;
use crate::kubernetes_api_objects::{
common::*, dynamic::*, error::ParseDynamicObjectError, marshal::*, object_meta::*,
};
use crate::pervasive_ext::string_view::*;
use vstd::prelude::*;

Expand Down
11 changes: 4 additions & 7 deletions src/kubernetes_api_objects/role.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
// Copyright 2022 VMware, Inc.
// SPDX-License-Identifier: MIT
use crate::kubernetes_api_objects::api_resource::*;
use crate::kubernetes_api_objects::common::*;
use crate::kubernetes_api_objects::dynamic::*;
use crate::kubernetes_api_objects::error::ParseDynamicObjectError;
use crate::kubernetes_api_objects::marshal::*;
use crate::kubernetes_api_objects::object_meta::*;
use crate::kubernetes_api_objects::resource::*;
use crate::kubernetes_api_objects::{
api_resource::*, common::*, dynamic::*, error::ParseDynamicObjectError, marshal::*,
object_meta::*, resource::*,
};
use crate::pervasive_ext::string_map::StringMap;
use crate::pervasive_ext::string_view::StringView;
use vstd::prelude::*;
Expand Down
11 changes: 4 additions & 7 deletions src/kubernetes_api_objects/role_binding.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
// Copyright 2022 VMware, Inc.
// SPDX-License-Identifier: MIT
use crate::kubernetes_api_objects::api_resource::*;
use crate::kubernetes_api_objects::common::*;
use crate::kubernetes_api_objects::dynamic::*;
use crate::kubernetes_api_objects::error::ParseDynamicObjectError;
use crate::kubernetes_api_objects::marshal::*;
use crate::kubernetes_api_objects::object_meta::*;
use crate::kubernetes_api_objects::resource::*;
use crate::kubernetes_api_objects::{
api_resource::*, common::*, dynamic::*, error::ParseDynamicObjectError, marshal::*,
object_meta::*, resource::*,
};
use crate::pervasive_ext::string_map::StringMap;
use crate::pervasive_ext::string_view::StringView;
use vstd::prelude::*;
Expand Down
11 changes: 4 additions & 7 deletions src/kubernetes_api_objects/secret.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
// Copyright 2022 VMware, Inc.
// SPDX-License-Identifier: MIT
use crate::kubernetes_api_objects::api_resource::*;
use crate::kubernetes_api_objects::common::*;
use crate::kubernetes_api_objects::dynamic::*;
use crate::kubernetes_api_objects::error::ParseDynamicObjectError;
use crate::kubernetes_api_objects::marshal::*;
use crate::kubernetes_api_objects::object_meta::*;
use crate::kubernetes_api_objects::resource::*;
use crate::kubernetes_api_objects::{
api_resource::*, common::*, dynamic::*, error::ParseDynamicObjectError, marshal::*,
object_meta::*, resource::*,
};
use crate::pervasive_ext::string_map::*;
use crate::pervasive_ext::string_view::*;
use vstd::prelude::*;
Expand Down
11 changes: 4 additions & 7 deletions src/kubernetes_api_objects/service.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
// Copyright 2022 VMware, Inc.
// SPDX-License-Identifier: MIT
use crate::kubernetes_api_objects::api_resource::*;
use crate::kubernetes_api_objects::common::*;
use crate::kubernetes_api_objects::dynamic::*;
use crate::kubernetes_api_objects::error::ParseDynamicObjectError;
use crate::kubernetes_api_objects::marshal::*;
use crate::kubernetes_api_objects::object_meta::*;
use crate::kubernetes_api_objects::resource::*;
use crate::kubernetes_api_objects::{
api_resource::*, common::*, dynamic::*, error::ParseDynamicObjectError, marshal::*,
object_meta::*, resource::*,
};
use crate::pervasive_ext::string_map::StringMap;
use crate::pervasive_ext::string_view::StringView;
use vstd::prelude::*;
Expand Down
11 changes: 4 additions & 7 deletions src/kubernetes_api_objects/service_account.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
// Copyright 2022 VMware, Inc.
// SPDX-License-Identifier: MIT
use crate::kubernetes_api_objects::api_resource::*;
use crate::kubernetes_api_objects::common::*;
use crate::kubernetes_api_objects::dynamic::*;
use crate::kubernetes_api_objects::error::ParseDynamicObjectError;
use crate::kubernetes_api_objects::marshal::*;
use crate::kubernetes_api_objects::object_meta::*;
use crate::kubernetes_api_objects::resource::*;
use crate::kubernetes_api_objects::{
api_resource::*, common::*, dynamic::*, error::ParseDynamicObjectError, marshal::*,
object_meta::*, resource::*,
};
use crate::pervasive_ext::string_map::*;
use crate::pervasive_ext::string_view::*;
use vstd::prelude::*;
Expand Down
14 changes: 4 additions & 10 deletions src/kubernetes_api_objects/stateful_set.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
// Copyright 2022 VMware, Inc.
// SPDX-License-Identifier: MIT
use crate::kubernetes_api_objects::api_resource::*;
use crate::kubernetes_api_objects::common::*;
use crate::kubernetes_api_objects::dynamic::*;
use crate::kubernetes_api_objects::error::ParseDynamicObjectError;
use crate::kubernetes_api_objects::label_selector::*;
use crate::kubernetes_api_objects::marshal::*;
use crate::kubernetes_api_objects::object_meta::*;
use crate::kubernetes_api_objects::persistent_volume_claim::*;
use crate::kubernetes_api_objects::pod_template_spec::*;
use crate::kubernetes_api_objects::resource::*;
use crate::kubernetes_api_objects::{
api_resource::*, common::*, dynamic::*, error::ParseDynamicObjectError, label_selector::*,
marshal::*, object_meta::*, persistent_volume_claim::*, pod_template_spec::*, resource::*,
};
use crate::pervasive_ext::string_map::*;
use crate::pervasive_ext::string_view::*;
use vstd::prelude::*;
Expand Down
11 changes: 4 additions & 7 deletions src/kubernetes_api_objects/toleration.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
// Copyright 2022 VMware, Inc.
// SPDX-License-Identifier: MIT
use crate::kubernetes_api_objects::api_resource::*;
use crate::kubernetes_api_objects::common::*;
use crate::kubernetes_api_objects::dynamic::*;
use crate::kubernetes_api_objects::error::ParseDynamicObjectError;
use crate::kubernetes_api_objects::marshal::*;
use crate::kubernetes_api_objects::object_meta::*;
use crate::kubernetes_api_objects::resource::*;
use crate::kubernetes_api_objects::{
api_resource::*, common::*, dynamic::*, error::ParseDynamicObjectError, marshal::*,
object_meta::*, resource::*,
};
use crate::pervasive_ext::string_map::*;
use crate::pervasive_ext::string_view::*;
use vstd::prelude::*;
Expand Down
Loading

0 comments on commit 5220708

Please sign in to comment.