NetApp Community Update
This site will enter Read Only mode on July 23 as we prepare to move to a new platform. You will still be able to view content, but posting and replying will be temporarily disabled.
We're excited to launch our new Community experience on July 30 and more information will follow soon.
Stay connected during the transition - Join our Discord community today.

ONTAP Rest API Discussions

REST API: How is the way attach Cloud tier target to Aggregate

ogatat
2,757 Views

Using PCL, I could successfully create CloudTarget. But couldn't atttach to existing aggregae.

-----

cloudstore = CloudStore.from_dict({
"target" : {"name" : "sgws_1" },
})
cloudstore.post()

-----

Error is followings:

NetAppRestError: Could not compute the location of the CloudStore collection. Values for ['aggregate.uuid'] are required. Caused by AttributeError("The 'aggregate' field has not been set on the CloudStore. Try refreshing the object by calling get().")

Where I can describe "aggregate.uuid"?

1 ACCEPTED SOLUTION

ogatat
2,723 Views

I solved the problem with the following!

-----

cloudstore = CloudStore("fb91b0a6-5fbb-11ec-be69-00a0985c5d5b")
cloudstore.target = {"name" : "sgws_1" }
cloudstore.post()

View solution in original post

2 REPLIES 2

ogatat
2,724 Views

I solved the problem with the following!

-----

cloudstore = CloudStore("fb91b0a6-5fbb-11ec-be69-00a0985c5d5b")
cloudstore.target = {"name" : "sgws_1" }
cloudstore.post()

RobertBlackhart
2,611 Views

Yes, this solution is correct. If you want to, you can combine the first two lines to make your solution look something like this:

 

cloudstore = CloudStore("fb91b0a6-5fbb-11ec-be69-00a0985c5d5b", target={"name": "sgws_1"})
cloudstore.post()

which would mean the same thing.

Public