Commits on Apr 19, 2017
  1. [java] Updated with v16 java source

    mthakkar committed Apr 17, 2017
Commits on Apr 3, 2017
  1. [api][services] OPSAPS-39906 Add a sample script for

    S3Guard Prune to the API examples
    I have added a simple utility script to the Python examples
    1. Listing the supported account types for a category.
    2. Listing the credential names for an account type.
    3. Executing S3Guard prune command for the given credential
    4. Listing the supported categories.
    Also, I allowed CM options to be configurable via arguments
    instead of hard-coding them in the script.
    This would be also added to our docs.
    Testing done:
    -Tested a real cluster than the script works.
    -Tested various input cases for the script.
    (cherry picked from commit 8414ee9d77ef825bb303e43d4f43ec78cc2314b3)
    (cherry picked from commit 5383a62333e1fdc5bda374953fc274a15a3f7c57)
    Aravind Selvan committed Feb 23, 2017
Commits on Feb 27, 2017
Commits on Feb 23, 2017
  1. [api][s3g] OPSAPS-39155 Python client changes for

    Prune command
    This change adds a new 'command by name' endpoint
    to external accounts that would be used to invoke
    Testing done:
    -make clean; python install; make test; make dist;
    -Using a Python script, tested that S3GuardPrune works
    on a cdep cluster.
    Aravind Selvan committed Feb 23, 2017
Commits on Feb 17, 2017
  1. [api] OPSAPS-39252 API endpoint for External Account Configs

    Vivek Chaudhary committed Feb 17, 2017
Commits on Feb 2, 2017
  1. [api] Bump version to v16 for 5.11

    This change is not intended for master.
    No-Crossport: master
    * make test (from python dir)
    * mvn install (from java dir)
    Darren Lo committed Jan 25, 2017
Commits on Jan 27, 2017
  1. [api] OPSAPS-31699 Add SSL context argument to ApiResource

    Starting in Python 2.7, SSL certificate validation is turned on by
    default (yay!), but means that if CM is using an SSL certificate not
    signed by a public CA, Python API calls will fail. To allow specifying
    a local CA certificate, we need to allow API users to pass in a custom
    SSL context. This change adds the SSL context argument to ApiResource.
    Because HTTPSHandler only supports the context argument in Python 2.7.9
    and above, this feature is only available in those versions.
    - Added an example script which connects to CM using a custom CA cert
    - Tested against my cluster which has HTTPS turned on
    jtran-cloudera committed Jan 27, 2017
Commits on Dec 9, 2016
  1. [recommission] OPSAPS-36382 Python API changes to support recommssion…

    … with start
    Added to api endpoints hosts_recommission_with_start() and recommission_with_start()
    for api_version >= 15.
    These endpoints will start decommissioned roles before doing the recommission.
    Francis Pang committed Dec 7, 2016
Commits on Nov 30, 2016
  1. [scm] OPSAPS-37770 Add cluster UUID

    The readonly attribute will only be present when using API>=15.
    hermancc committed Nov 30, 2016
Commits on Nov 29, 2016
Commits on Nov 17, 2016
  1. [API] OPSAPS-37912 part 3 Change the CM API to v15 for CM5.10

    CM Python API side changes. This change is only for cm5-5.x branch.
    make test (from python dir)
    mvn install (from java dir)
    Shailesh Shiwalkar committed Nov 17, 2016
Commits on Aug 29, 2016
  1. [cm-api] OPSAPS-36009 Comment for command retry in the cm_api Python

    github needs to be updated.
    - Removed the note in the comment/doc "Note: The retry will only work
    for ClusterUpgrade command for now". This is not valid anymore and more
    commands could become retriable soon. Maintaining a while list here is
    not reasonable. A command that cannot be retried its canRetry attribute
    will be false. That should be good enough.
    Vivek Chaudhary committed Aug 29, 2016
Commits on Aug 27, 2016
  1. [DR] OPSAPS-35892 cm_api changes for HDFS Cloud replication schedule …

    o Cloud HDFS Replication now has two for cloud accounts.
    o user is expected to use one of them for given schedule.
    o Unit test case changes.
    Nachiket Vaidya committed with jenkins Jul 26, 2016
Commits on Aug 22, 2016
Commits on Aug 17, 2016
  1. [scm] OPSAPS-35700 Add external accounts to python API.

        Identical modeling to the final API model in OPSAPS-34817.
         - test scripts to test each of the APIs separately against a recent server
         - new unit tests
        Sample python script:
        from cm_api.api_client import ApiResource, ApiException, API_CURRENT_VERSION
        api = ApiResource(server_host="", username="admin", password="admin", version=14)
        cats = api.get_supported_external_account_categories()
        print "cat: %s" %(cats)
        for cat in cats:
          types = api.get_supported_external_account_types(
          for type_ in types:
            print "type: %s, allowed: %s" %(, type_.allowedAccountConfigs)
        name = "test7"
        acct = api.create_external_account(name=name, display_name=name,
        print "Created: %s" % acct
        acct.accountConfigs['aws_access_key'] = "test1"
        acct.accountConfigs['aws_secret_key'] = "test2"
        acct_updated = api.update_external_account(acct)
        print "Updated: %s with configs: %s" % (acct_updated, acct_updated.accountConfigs)
        acct_deleted = api.delete_external_account(
        print "Deleted: %s" % acct_deleted
    Jayesh Seshadri committed Aug 17, 2016
Commits on Aug 15, 2016
  1. [scm] OPSAPS-35724 Add "sensitive" to ApiConfig

    Trivial change, matching OPSAPS-35589.
    Testing: Verified failure with "full" views goes away with update, and "sensitive" is parsed correctly.
    Jayesh Seshadri committed Aug 15, 2016
Commits on Aug 10, 2016
  1. [API] OPSAPS-35644 | Add update_user() method to python API client.

    Bug: OPSAPS-35644
    Need update_user() method in python API client.
    - Add update_user() python API client.
    - Update mock unit test.
    Reviewer: alexm, jayesh
    - Ran updated unit test.
    - Wrote a python client program to test update
    operation on user.
    from cm_api.api_client import ApiResource
    from cm_api.endpoints.users import ApiUser
    CM_HOST = ""
    CM_PORT = 7180
    CM_USERNAME = "admin"
    CM_PASSWD = "admin"
    api = ApiResource(CM_HOST, CM_PORT, CM_USERNAME, CM_PASSWD, version=7)
    for u in api.get_all_users():
      print ','.join(u.roles)
      if == "guest":
        n = ApiUser(api,, roles=[ 'ROLE_LIMITED' ])
    for u in api.get_all_users():
      print ','.join(u.roles)
    bankim@osboxes:~/scripts$ python
    Bankim Bhavsar committed Aug 10, 2016
Commits on Jul 18, 2016
  1. [bdr] OPSAPS-35146 Include hive UDF properties into ApiHiveReplicatio…

    Missed this in my original changes for OPSAPS-21647.
    -Ran API unit tests (with new test params)
    -Ran python v13 client and python v14 client against a CM with hive UDF results; verified output matches schema, and there were no parse errors.
    Jayesh Seshadri committed Jul 18, 2016
Commits on Jul 14, 2016
  1. [Cloudera Manager] OPSAPS-34769 Update CM python API Client

    for new add/list/delete watched dirs
    Add 'add/list/remove watcheddir' methods in '' as the client functions;
    Add 'ApiWatchedDirList' and 'ApiWatchedDir' classes in '' as new
    data types; Create '' and add four test cases capturing
    'add/list/remove watched directories' behaviors.
    Test done:
    End-to-end test, running the added methods (in '') on CM server and
    verify results;
    python install;
    make clean test.
    Quan Yang committed Jul 13, 2016
Commits on Jun 30, 2016
  1. [API][SupportIntegration] OPSAPS-32230 Set API version to 2 for coll…

     collect_diagnostic_data() was deprecated, in place of collect_diagnostic_data_45(), in CM API
     version 3 which was introduced as a part of CM 4.5.
     Testing done:
     -make test
    Aravind Selvan committed Jun 30, 2016
Commits on Jun 27, 2016
  1. OPSAPS-32613 [DR] (PART VI) Add python APIs for hdfs s3 replication

    1. added class ApiHdfsCloudReplicationArguments;
    2. changed class ApiReplicationSchedule by adding field 'hdfsCloudArguments';
    3. changed to allow cloud schedule creation;
    4. added unit tests.
    Lei Shi committed with lei shi May 6, 2016
Commits on Jun 25, 2016
  1. Make more tolerant of invocation mode.

    Without this change, may be sensitive to whether or not
    it is referred to with a directory or not:
    python ./ ....
    python ....
    Michal Ostrowski committed Jun 24, 2016
  2. Add top-level

    This file is basically a symlink to "python/" expressed in
    python code.  If python executes "", it will be effectively
    executing "python/".
    This is required to allow PIP installation from a git repo, which assumes
    that "" is at the root.
    pip install 'git+'
    Michal Ostrowski committed Apr 28, 2016
  3. Use os.path.normpath for source paths.

    setuptools is sensitive to "src" vs "./src" and prefers the former.
    This doesn't matter much, but without using the former generated packages
    cannot be correctly specified as dependencies of othe packages via a git
    Make python package zip-safe (i.e. allow execute from zipfile).
    Michal Ostrowski committed Apr 27, 2016
Commits on Jun 20, 2016
  1. [api] OPSAPS-34577 Bump CM API to v14 (CM Python API side changes)

    Bump up the CM python API version to 14.
    make test
    Aravind Selvan committed Jun 20, 2016
Commits on May 16, 2016
Commits on May 12, 2016
Commits on Apr 21, 2016
  1. Fix selection of source directories to allow for use of absolute_import.

    The inclusion of "cm_api", "cm_shell" as part of the location rather than
    the package name prevents python programs using
    "from __future__ import absolute_import".
    Michal Ostrowski committed Apr 4, 2016
Commits on Apr 19, 2016
  1. [api] OPSAPS-33039 CM API support for collecting global diag bundle f…

    …or a certain time range
    Adding start_time parameter to collect diagnostics data. Valid since v13.
    Testing done:
    make test
    make dist
    Aravind Selvan committed Apr 16, 2016
Commits on Apr 15, 2016
  1. [api] OPSAPS-32887 CM API version needs to be incremented to 13

    Bump API version to 13 for CM 5.8 on the CM Python API
    make test
    Aravind Selvan committed Mar 30, 2016
Commits on Mar 22, 2016
  1. [diag bundles/charts] OPSAPS-32866 Use the optional metrics collectio…

    …n argument in the collect_diag_data API call only for versions >= 13
    gkamat committed Mar 22, 2016
Commits on Mar 18, 2016
  1. [diag bundles/charts] OPSAPS-29951 CM API change for packaging servic…

    …e and host monitor metrics data into diagnostic bundles
    gkamat committed Mar 18, 2016
Commits on Mar 10, 2016
  1. [api] OPSAPS-32658. Support pools refresh starting v6

    Since it's actually been around for a while.
    hermancc committed Mar 10, 2016
  2. [api] OPSAPS-32658. Add pools refresh endpoint

    Nothing special. It's been MIA for a while.
    >>> from cm_api.api_client import ApiResource
    >>> api=ApiResource("", username="admin", password="admin")
    >>> cluster=api.get_cluster("Cluster 1")
    >>> cmd = cluster.pools_refresh()
    hermancc committed Mar 10, 2016