ONTAP Rest API Discussions

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

ogatat
1,789 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
1,755 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
1,756 Views

I solved the problem with the following!

-----

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

RobertBlackhart
1,643 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