original_docstring: 
     Simple command-line program for listing Datastores in Datastore Cluster
     
docstring: Simple command-line program for listing Datastores in Datastore Cluster
docstring_tokens: Simple command - line program for listing Datastores in Datastore Cluster
code: def main():
      """
     Simple command-line program for listing Datastores in Datastore Cluster
     """
  
      args = get_args()
  
      try:
          service_instance = connect.SmartConnect(host=args.host,
                                                  user=args.user,
                                                  pwd=args.password,
                                                  port=int(args.port))
          if not service_instance:
              print("Could not connect to the specified host using "
                    "specified username and password")
              return -1
  
          atexit.register(connect.Disconnect, service_instance)
  
          content = service_instance.RetrieveContent()
          # Search for all Datastore Clusters aka StoragePod
          obj_view = content.viewManager.CreateContainerView(content.rootFolder,
                                                             [vim.StoragePod],
                                                             True)
          ds_cluster_list = obj_view.view
          obj_view.Destroy()
  
          for ds_cluster in ds_cluster_list:
              if ds_cluster.name == args.dscluster:
                  datastores = ds_cluster.childEntity
                  print "Datastores: "
                  for datastore in datastores:
                      print datastore.name
  
      except vmodl.MethodFault as error:
          print "Caught vmodl fault : " + error.msg
          return -1
  
      return 0
code_tokens: def main ( ) : args = get_args ( ) try : service_instance = connect . SmartConnect ( host = args . host , user = args . user , pwd = args . password , port = int ( args . port ) ) if not service_instance : print ( "Could not connect to the specified host using " "specified username and password" ) return - 1 atexit . register ( connect . Disconnect , service_instance ) content = service_instance . RetrieveContent ( ) obj_view = content . viewManager . CreateContainerView ( content . rootFolder , [ vim . StoragePod ] , True ) ds_cluster_list = obj_view . view obj_view . Destroy ( ) for ds_cluster in ds_cluster_list : if ds_cluster . name == args . dscluster : datastores = ds_cluster . childEntity print "Datastores: " for datastore in datastores : print datastore . name except vmodl . MethodFault as error : print "Caught vmodl fault : " + error . msg return - 1 return 0
short_docstring: Simple command-line program for listing Datastores in Datastore Cluster
short_docstring_tokens: Simple command - line program for listing Datastores in Datastore Cluster
comment: """
     Simple command-line program for listing Datastores in Datastore Cluster
     """$SEP$# Search for all Datastore Clusters aka StoragePod