Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

Commit

Permalink
Deploy 0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Aurélien Nicolas committed Apr 7, 2022
1 parent ff47e70 commit 3e55b5c
Show file tree
Hide file tree
Showing 6 changed files with 286 additions and 61 deletions.
2 changes: 1 addition & 1 deletion bucket/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ddc_bucket"
version = "0.3.0"
version = "0.4.0"
authors = ["Aurélien Nicolas <[email protected]>"]
edition = "2021"

Expand Down
27 changes: 14 additions & 13 deletions print_ddc_bucket.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ async function main() {
const nodes = await ddcBucketQuery.nodeList(contract, ACCOUNT_FILTER);
log("\nNodes", JSON.stringify(nodes, null, 4));

const buckets = await ddcBucketQuery.bucketListStatuses(contract, ACCOUNT_FILTER);
const buckets = await ddcBucketQuery.bucketList(contract, ACCOUNT_FILTER);
log("\nBuckets", JSON.stringify(buckets, null, 4));

printGraph(clusters, nodes, buckets);
Expand All @@ -38,41 +38,42 @@ function printGraph(clusters, nodes, buckets) {
log("graph BT;");
log();

for (node of nodes) {
for (status of nodes) {
let {node_id, node} = status;
// Define
log(`Node_${node.node_id}[(Node ${node.node_id})]`);
log(`Node_${node_id}[(Node ${node_id})]`);

// Node to Provider.
log(`Node_${node.node_id} -. owned by .-> Account_${node.provider_id.substr(0, 8)}`);
log(`Node_${node_id} -. owned by .-> Account_${node.provider_id.substr(0, 8)}`);
log();
}

for (cluster of clusters) {
for (status of clusters) {
let {cluster_id, cluster} = status;
// Define
log(`Cluster_${cluster.cluster_id}((Cluster ${cluster.cluster_id}))`);
log(`Cluster_${cluster_id}((Cluster ${cluster_id}))`);

// Cluster to Manager.
log(`Cluster_${cluster.cluster_id} -. managed by ..-> Account_${cluster.manager_id.substr(0, 8)}`);
log(`Cluster_${cluster_id} -. managed by ..-> Account_${cluster.manager_id.substr(0, 8)}`);

// Cluster to Node.
for (i = 0; i < cluster.vnodes.length; i++) {
let node_id = cluster.vnodes[i];
log(`Cluster_${cluster.cluster_id} -- P${i} --> Node_${node_id}`);
log(`Cluster_${cluster_id} -- P${i} --> Node_${node_id}`);
}
log();
}

for (status of buckets) {
let {bucket_id, bucket} = status;
// Define
log(`Bucket_${status.bucket_id}[[Bucket ${status.bucket_id}]]`);
log(`Bucket_${bucket_id}[[Bucket ${bucket_id}]]`);

// Bucket to Owner.
log(`Bucket_${status.bucket_id} -. owned by ...-> Account_${status.bucket.owner_id.substr(0, 8)}`);
log(`Bucket_${bucket_id} -. owned by ...-> Account_${bucket.owner_id.substr(0, 8)}`);

// Bucket to Cluster.
for (cluster_id of status.bucket.cluster_ids) {
log(`Bucket_${status.bucket_id} -- allocated into --> Cluster_${cluster_id}`);
}
log(`Bucket_${bucket_id} -- allocated into --> Cluster_${bucket.cluster_id}`);
log();
}

Expand Down
2 changes: 1 addition & 1 deletion sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cere/ddc-contracts-sdk",
"version": "0.3.0",
"version": "0.4.0",
"main": "src/index.js",
"license": "MIT",
"dependencies": {
Expand Down
Loading

0 comments on commit 3e55b5c

Please sign in to comment.