scenarios_api#

class ScenariosApi(api_client=None)#

Bases: object

create_scenario(body, **kwargs)#

Create a capacity planning scenario

>>> response = api.create_scenario(body)

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True.

>>> thread = api.create_scenario(body, async_req=True)
>>> result = thread.get()
Parameters:
  • body (Scenario, required) – Capacity planning scenario sent for creation.

  • kwargs

    kwargs for the method. The following can be passed for an asynchronous HTTP call:

    async_req=True
    

Returns:

An instance of class CreateScenarioApiResponse.

If the method is called asynchronously, returns the request thread.

create_simulation(body, **kwargs)#

Create a simulation

>>> response = api.create_simulation(body)

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True.

>>> thread = api.create_simulation(body, async_req=True)
>>> result = thread.get()
Parameters:
  • body (Simulation, required) – Indicates the parameters required for creating the simulation.

  • kwargs

    kwargs for the method. The following can be passed for an asynchronous HTTP call:

    async_req=True
    

Returns:

An instance of class CreateSimulationApiResponse.

If the method is called asynchronously, returns the request thread.

delete_scenario_by_id(extId, **kwargs)#

Delete a capacity planning scenario

>>> response = api.delete_scenario_by_id(extId)

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True.

>>> thread = api.delete_scenario_by_id(extId, async_req=True)
>>> result = thread.get()
Parameters:
  • extId (str, required) – UUID of a capacity planning scenario.

  • kwargs

    kwargs for the method. The following can be passed for an asynchronous HTTP call:

    async_req=True
    

Returns:

An instance of class DeleteScenarioApiResponse.

If the method is called asynchronously, returns the request thread.

delete_simulation_by_id(extId, **kwargs)#

Delete a simulation

>>> response = api.delete_simulation_by_id(extId)

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True.

>>> thread = api.delete_simulation_by_id(extId, async_req=True)
>>> result = thread.get()
Parameters:
  • extId (str, required) – UUID of a simulation.

  • kwargs

    kwargs for the method. The following can be passed for an asynchronous HTTP call:

    async_req=True
    

Returns:

An instance of class DeleteSimulationApiResponse.

If the method is called asynchronously, returns the request thread.

generate_recommendation(extId, **kwargs)#

Generate recommendation for a capacity planning scenario

>>> response = api.generate_recommendation(extId)

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True.

>>> thread = api.generate_recommendation(extId, async_req=True)
>>> result = thread.get()
Parameters:
  • extId (str, required) – UUID of a capacity planning scenario.

  • kwargs

    kwargs for the method. The following can be passed for an asynchronous HTTP call:

    async_req=True
    

Returns:

An instance of class GenerateRecommendationApiResponse.

If the method is called asynchronously, returns the request thread.

generate_report(extId, **kwargs)#

Generate a report for a planned capacity scenario

>>> response = api.generate_report(extId)

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True.

>>> thread = api.generate_report(extId, async_req=True)
>>> result = thread.get()
Parameters:
  • extId (str, required) – UUID of a capacity planning scenario.

  • kwargs

    kwargs for the method. The following can be passed for an asynchronous HTTP call:

    async_req=True
    

Returns:

An instance of class GenerateReportApiResponse.

If the method is called asynchronously, returns the request thread.

generate_runway(extId, **kwargs)#

Generate runway for a planned capacity scenario

>>> response = api.generate_runway(extId)

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True.

>>> thread = api.generate_runway(extId, async_req=True)
>>> result = thread.get()
Parameters:
  • extId (str, required) – UUID of a capacity planning scenario.

  • kwargs

    kwargs for the method. The following can be passed for an asynchronous HTTP call:

    async_req=True
    

Returns:

An instance of class GenerateRunwayApiResponse.

If the method is called asynchronously, returns the request thread.

get_scenario_by_id(extId, **kwargs)#

Get a single capacity planning scenario

>>> response = api.get_scenario_by_id(extId)

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True.

>>> thread = api.get_scenario_by_id(extId, async_req=True)
>>> result = thread.get()
Parameters:
  • extId (str, required) – UUID of a capacity planning scenario.

  • kwargs

    kwargs for the method. The following can be passed for an asynchronous HTTP call:

    async_req=True
    

Returns:

An instance of class GetScenarioApiResponse.

If the method is called asynchronously, returns the request thread.

get_scenario_report(scenarioExtId, **kwargs)#

Get the generated report for a planned capacity scenario

>>> response = api.get_scenario_report(scenarioExtId)

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True.

>>> thread = api.get_scenario_report(scenarioExtId, async_req=True)
>>> result = thread.get()
Parameters:
  • scenarioExtId (str, required) – UUID of the capacity planning scenario to get the report.

  • kwargs

    kwargs for the method. The following can be passed for an asynchronous HTTP call:

    async_req=True
    

Returns:

An instance of class GetScenarioReportApiResponse.

If the method is called asynchronously, returns the request thread.

get_simulation_by_id(extId, **kwargs)#

Get a simulation

>>> response = api.get_simulation_by_id(extId)

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True.

>>> thread = api.get_simulation_by_id(extId, async_req=True)
>>> result = thread.get()
Parameters:
  • extId (str, required) – UUID of a simulation.

  • kwargs

    kwargs for the method. The following can be passed for an asynchronous HTTP call:

    async_req=True
    

Returns:

An instance of class GetSimulationApiResponse.

If the method is called asynchronously, returns the request thread.

list_scenarios(_page=None, _limit=None, _filter=None, _orderby=None, _select=None, **kwargs)#

Get a list of capacity planning scenarios

>>> response = api.list_scenarios((optional) _page, (optional) _limit, (optional) _filter, (optional) _orderby, (optional) _select)

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True.

>>> thread = api.list_scenarios(async_req=True)
>>> result = thread.get()
Parameters:
  • _page (int) – A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results.

  • _limit (int) – A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set.

  • _filter (str) – A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter ‘$filter=name eq ‘karbon-ntnx-1.0’ would filter the result on cluster name ‘karbon-ntnx1.0’, filter ‘$filter=startswith(name, ‘C’)’ would filter on cluster name starting with ‘C’. The filter can be applied to the following fields: - clusterExtId

  • _orderby (str) – A URL query parameter that allows clients to specify the sort criteria for the returned list of objects. Resources can be sorted in ascending order using asc or descending order using desc. If asc or desc are not specified, the resources will be sorted in ascending order by default. For example, ‘$orderby=templateName desc’ would get all templates sorted by templateName in descending order. The orderby can be applied to the following fields: - updatedTime

  • _select (str) – A URL query parameter that allows clients to request a specific set of properties for each entity or complex type. Expression specified with the $select must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. If a $select expression consists of a single select item that is an asterisk (i.e., *), then all properties on the matching resource will be returned. - clusterConfig - clusterExtId - extId - name - runway - targetRunwayDays - tenantId - updatedTime - vendors - workloads

  • kwargs

    kwargs for the method. The following can be passed for an asynchronous HTTP call:

    async_req=True
    

Returns:

An instance of class ListScenariosApiResponse.

If the method is called asynchronously, returns the request thread.

list_simulations(_page=None, _limit=None, _filter=None, _orderby=None, _select=None, **kwargs)#

Get a list of simulations

>>> response = api.list_simulations((optional) _page, (optional) _limit, (optional) _filter, (optional) _orderby, (optional) _select)

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True.

>>> thread = api.list_simulations(async_req=True)
>>> result = thread.get()
Parameters:
  • _page (int) – A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results.

  • _limit (int) – A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set.

  • _filter (str) – A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter ‘$filter=name eq ‘karbon-ntnx-1.0’ would filter the result on cluster name ‘karbon-ntnx1.0’, filter ‘$filter=startswith(name, ‘C’)’ would filter on cluster name starting with ‘C’. The filter can be applied to the following fields: - name - simulationSpec/hddGb - simulationSpec/ramGb - simulationSpec/ssdGb - simulationSpec/vcpuCount

  • _orderby (str) – A URL query parameter that allows clients to specify the sort criteria for the returned list of objects. Resources can be sorted in ascending order using asc or descending order using desc. If asc or desc are not specified, the resources will be sorted in ascending order by default. For example, ‘$orderby=templateName desc’ would get all templates sorted by templateName in descending order. The orderby can be applied to the following fields: - name - simulationSpec/hddGb - simulationSpec/ramGb - simulationSpec/ssdGb - simulationSpec/vcpuCount

  • _select (str) – A URL query parameter that allows clients to request a specific set of properties for each entity or complex type. Expression specified with the $select must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. If a $select expression consists of a single select item that is an asterisk (i.e., *), then all properties on the matching resource will be returned. - extId - links - name - simulationSpec/hddGb - simulationSpec/ramGb - simulationSpec/ssdGb - simulationSpec/vcpuCount - tenantId

  • kwargs

    kwargs for the method. The following can be passed for an asynchronous HTTP call:

    async_req=True
    

Returns:

An instance of class ListSimulationsApiResponse.

If the method is called asynchronously, returns the request thread.

update_scenario_by_id(extId, body, **kwargs)#

Update a capacity planning scenario

>>> response = api.update_scenario_by_id(extId, body)

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True.

>>> thread = api.update_scenario_by_id(extId, body, async_req=True)
>>> result = thread.get()
Parameters:
  • extId (str, required) – UUID of a capacity planning scenario.

  • body (Scenario, required) – Capacity planning scenario sent for updation.

  • kwargs

    kwargs for the method. The following can be passed for an asynchronous HTTP call:

    async_req=True
    

Returns:

An instance of class UpdateScenarioApiResponse.

If the method is called asynchronously, returns the request thread.

update_simulation_by_id(extId, body, **kwargs)#

Update a simulation

>>> response = api.update_simulation_by_id(extId, body)

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True.

>>> thread = api.update_simulation_by_id(extId, body, async_req=True)
>>> result = thread.get()
Parameters:
  • extId (str, required) – UUID of a simulation.

  • body (Simulation, required) – Indicates the parameters required for updating the simulation.

  • kwargs

    kwargs for the method. The following can be passed for an asynchronous HTTP call:

    async_req=True
    

Returns:

An instance of class UpdateSimulationApiResponse.

If the method is called asynchronously, returns the request thread.