Skip to content
This repository was archived by the owner on Jun 6, 2023. It is now read-only.

Commit 8c72960

Browse files
committed
update jobs machineTypes to add region, change property clusterName to cluster, remove clusterType
1 parent 31bffe2 commit 8c72960

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

lib/jobs/machineTypes.js

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,16 @@ var assign = require('lodash.assign');
99
* @description Return a list of available cluster machine types. If the isBusy property is true then all machines of the specified type and cluster are currently running jobs.
1010
* The machineTypes method takes an optional first argument to limit the returned cluster machine type objects.
1111
* @param {object} [filter] - An optional filter object to limit the returned job objects
12-
* @param {string} [filter.clusterName] - Optional cluster name to match on
12+
* @param {string} [filter.region] - Optional region to match on
13+
* @param {string} [filter.cluster] - Optional cluster to match on
1314
* @param {string} [filter.machineType] - Optional machine type to macth on
1415
* @param {boolean} [filter.isBusy] - Optional busy status value to match on
1516
* @param {function} cb - Node-style error-first callback function
1617
* @returns {array} [ clusterMachineType, ... ] - JSON array of available cluster machine type objects
1718
* @example
1819
* paperspace.jobs.machineTypes({
19-
* // clusterName: 'PS Jobs', // optional filter on cluster name
20+
* // region: 'East Coast (NY2)', // optional filter on region
21+
* // cluster: 'PS Jobs', // optional filter on cluster
2022
* // machineType: 'P5000', // optional filter on machine type
2123
* // isBusy: false, // optional filter on busy status
2224
* }, function(err, res) {
@@ -34,26 +36,26 @@ var assign = require('lodash.assign');
3436
* //Example return value:
3537
* [
3638
* {
37-
* "clusterType": "Jobs Cluster",
38-
* "clusterName": "PS Jobs",
39+
* "region": "East Coast (NY2)",
40+
* "cluster": "PS Jobs",
3941
* "machineType": "P5000",
4042
* "isBusy": false,
4143
* },
4244
* {
43-
* "clusterType": "Jobs Cluster",
44-
* "clusterName": "PS Jobs",
45+
* "region": "East Coast (NY2)",
46+
* "cluster": "PS Jobs",
4547
* "machineType": "V100",
4648
* "isBusy": false,
4749
* },
4850
* {
49-
* "clusterType": "Jobs Cluster",
50-
* "clusterName": "PS Jobs on GCP",
51+
* "region": "GCP West",
52+
* "cluster": "PS Jobs on GCP",
5153
* "machineType": "K80",
5254
* "isBusy": false,
5355
* },
5456
* {
55-
* "clusterType": "Jobs Cluster",
56-
* "clusterName": "PS Jobs on GCP",
57+
* "region": "GCP West",
58+
* "cluster": "PS Jobs on GCP",
5759
* "machineType": "P100",
5860
* "isBusy": false,
5961
* }

0 commit comments

Comments
 (0)