You can count how many deployments you have cumulatively made on your PureApplication System since it was first installed using the following CLI script:

virtual_systems = http.get('/resources/virtualSystems/?type=WORKLOAD')
try :
  max_id = max([x['id'] for x in virtual_systems])
  print "The maximum deployment id is %d" % max_id
except :
  print "There are no running deployments"

This script takes advantage of the fact that PureApplication deployments have an internal identifier with a monotonically increasing value. This allows the script to account for older deployments that have been deleted. However, the count assumes that your most recent deployment is still active. If you currently have no deployments, it will not be able to calculate a result; or if you have deleted your most recent deployments, it will account for all deployments up to the most recent remaining deployment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s