Software Development Kit (SDK) and API Discussions

SnapCentre and Ansible

darraghos
2,558 Views

Any plans to create Ansible modules for SnapCentre? 

1 ACCEPTED SOLUTION

mbeattie
2,535 Views

Hi,

 

I'm not aware of any "official" plans but it sure is a good idea and would make a lot of sense given NetApp's investment in Ansible. It should be possible to use the URI module to invoke SnapCenter REST API's but it would be much easier to have native SnapCenter Ansible modules that abstracted complexity. I started something similar a while ago for a PowerShell module which is a wrapper around the REST API's. Same concept could be applied to Ansible modules for SnapCenter. What's your use case?

 

https://github.com/matthew-beattie/SnapCenter/blob/master/SnapCenter.psm1 

 

/Matt

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

View solution in original post

6 REPLIES 6

mbeattie
2,536 Views

Hi,

 

I'm not aware of any "official" plans but it sure is a good idea and would make a lot of sense given NetApp's investment in Ansible. It should be possible to use the URI module to invoke SnapCenter REST API's but it would be much easier to have native SnapCenter Ansible modules that abstracted complexity. I started something similar a while ago for a PowerShell module which is a wrapper around the REST API's. Same concept could be applied to Ansible modules for SnapCenter. What's your use case?

 

https://github.com/matthew-beattie/SnapCenter/blob/master/SnapCenter.psm1 

 

/Matt

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

darraghos
2,514 Views

Thanks @mbeattie for taking the time to reply! Out of interest, why did you build a module instead of using the CMDLETS provided with SC 4.4 or was this not available in SC 4.2? 

RazaSuleman
1,520 Views

Hi. I am also looking for Ansible modules for snapcenter. Has any progress being made on this? One of my use cases is to take backup of a database and then verify/return successfull completion of the job before proceeding to the next item in my automation work flow. 

mbeattie
1,515 Views

Hi,

 

I'm not aware of any 'official' snapcenter ansible modules though i am familiar with Python and Ansible. What version of SnapCenter are you using? I'll see if i can get access to a lab and try developing a module for it.

 

/Matt

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

RazaSuleman
1,496 Views

Hi, Thanks for getting back so quickly. We are currently using version 4.4. We plan to update at a later date to 4.5.

 

Thank you

mbeattie
1,475 Views

Hi,

 

I've taken a look in a lab for you however it appears there is no POST method for invoking backups: /{api_version}/backups/{name}

 

There is GET, PUT and DELETE but not POST method. Investigating further...

 

/Matt

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.
Public