cm_client.ParcelResourceApi

All URIs are relative to /api/v58

Method HTTP request Description
activate_command POST /clusters/{clusterName}/parcels/products/{product}/versions/{version}/commands/activate
cancel_distribution_command POST /clusters/{clusterName}/parcels/products/{product}/versions/{version}/commands/cancelDistribution
cancel_download_command POST /clusters/{clusterName}/parcels/products/{product}/versions/{version}/commands/cancelDownload
deactivate_command POST /clusters/{clusterName}/parcels/products/{product}/versions/{version}/commands/deactivate
read_parcel GET /clusters/{clusterName}/parcels/products/{product}/versions/{version}
remove_download_command POST /clusters/{clusterName}/parcels/products/{product}/versions/{version}/commands/removeDownload
start_distribution_command POST /clusters/{clusterName}/parcels/products/{product}/versions/{version}/commands/startDistribution
start_download_command POST /clusters/{clusterName}/parcels/products/{product}/versions/{version}/commands/startDownload
start_removal_of_distribution_command POST /clusters/{clusterName}/parcels/products/{product}/versions/{version}/commands/startRemovalOfDistribution

activate_command

ApiCommand activate_command(cluster_name, product, version)

A synchronous command that activates the parcel on the cluster.

Since it is synchronous, the result is known immediately upon return.

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ParcelResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | 
product = 'product_example' # str | the product
version = 'version_example' # str | the version

try:
    api_response = api_instance.activate_command(cluster_name, product, version)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ParcelResourceApi->activate_command: %s\n" % e)

Parameters

Name Type Description Notes
cluster_name str
product str the product
version str the version

Return type

ApiCommand

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

cancel_distribution_command

ApiCommand cancel_distribution_command(cluster_name, product, version)

A synchronous command that cancels the parcel distribution.

Since it is synchronous, the result is known immediately upon return.

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ParcelResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | 
product = 'product_example' # str | the product
version = 'version_example' # str | the version

try:
    api_response = api_instance.cancel_distribution_command(cluster_name, product, version)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ParcelResourceApi->cancel_distribution_command: %s\n" % e)

Parameters

Name Type Description Notes
cluster_name str
product str the product
version str the version

Return type

ApiCommand

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

cancel_download_command

ApiCommand cancel_download_command(cluster_name, product, version)

A synchronous command that cancels the parcel download.

Since it is synchronous, the result is known immediately upon return.

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ParcelResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | 
product = 'product_example' # str | the product
version = 'version_example' # str | the version

try:
    api_response = api_instance.cancel_download_command(cluster_name, product, version)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ParcelResourceApi->cancel_download_command: %s\n" % e)

Parameters

Name Type Description Notes
cluster_name str
product str the product
version str the version

Return type

ApiCommand

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deactivate_command

ApiCommand deactivate_command(cluster_name, product, version)

A synchronous command that deactivates the parcel on the cluster.

Since it is synchronous, the result is known immediately upon return.

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ParcelResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | 
product = 'product_example' # str | the product
version = 'version_example' # str | the version

try:
    api_response = api_instance.deactivate_command(cluster_name, product, version)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ParcelResourceApi->deactivate_command: %s\n" % e)

Parameters

Name Type Description Notes
cluster_name str
product str the product
version str the version

Return type

ApiCommand

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

read_parcel

ApiParcel read_parcel(cluster_name, product, version)

Retrieves detailed information about a parcel.

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ParcelResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | 
product = 'product_example' # str | the product
version = 'version_example' # str | the version

try:
    api_response = api_instance.read_parcel(cluster_name, product, version)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ParcelResourceApi->read_parcel: %s\n" % e)

Parameters

Name Type Description Notes
cluster_name str
product str the product
version str the version

Return type

ApiParcel

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

remove_download_command

ApiCommand remove_download_command(cluster_name, product, version)

A synchronous command that removes the downloaded parcel.

Since it is synchronous, the result is known immediately upon return.

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ParcelResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | 
product = 'product_example' # str | the product
version = 'version_example' # str | the version

try:
    api_response = api_instance.remove_download_command(cluster_name, product, version)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ParcelResourceApi->remove_download_command: %s\n" % e)

Parameters

Name Type Description Notes
cluster_name str
product str the product
version str the version

Return type

ApiCommand

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

start_distribution_command

ApiCommand start_distribution_command(cluster_name, product, version)

A synchronous command that starts the distribution of the parcel to the cluster.

Since it is synchronous, the result is known immediately upon return. In order to see the progress of the distribution, a call to readParcel() needs to be made.

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ParcelResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | 
product = 'product_example' # str | the product
version = 'version_example' # str | the version

try:
    api_response = api_instance.start_distribution_command(cluster_name, product, version)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ParcelResourceApi->start_distribution_command: %s\n" % e)

Parameters

Name Type Description Notes
cluster_name str
product str the product
version str the version

Return type

ApiCommand

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

start_download_command

ApiCommand start_download_command(cluster_name, product, version)

A synchronous command that starts the parcel download.

Since it is synchronous, the result is known immediately upon return. In order to see the progress of the download, a call to readParcel() needs to be made.

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ParcelResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | 
product = 'product_example' # str | the product
version = 'version_example' # str | the version

try:
    api_response = api_instance.start_download_command(cluster_name, product, version)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ParcelResourceApi->start_download_command: %s\n" % e)

Parameters

Name Type Description Notes
cluster_name str
product str the product
version str the version

Return type

ApiCommand

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

start_removal_of_distribution_command

ApiCommand start_removal_of_distribution_command(cluster_name, product, version)

A synchronous command that removes the distribution from the hosts in the cluster.

Since it is synchronous, the result is known immediately upon return. In order to see the progress of the removal, a call to readParcel() needs to be made.

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.ParcelResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | 
product = 'product_example' # str | the product
version = 'version_example' # str | the version

try:
    api_response = api_instance.start_removal_of_distribution_command(cluster_name, product, version)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ParcelResourceApi->start_removal_of_distribution_command: %s\n" % e)

Parameters

Name Type Description Notes
cluster_name str
product str the product
version str the version

Return type

ApiCommand

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]