Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update clusters.py #37

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Update clusters.py #37

wants to merge 10 commits into from

Conversation

bms231
Copy link

@bms231 bms231 commented Dec 15, 2015

for v11 API otherwise you get the below when you call get_all_clusters
AttributeError: Invalid property hostsUrl for class ApiCluster.
AttributeError: Invalid property entityStatus for class ApiCluster.

Jimvin and others added 10 commits April 6, 2015 16:48
There is now a new command line option [-t|-tls] that will enable TLS for the connection to the Cloudera API. Note that enabling TLS will not automatically change the port the client connects to CM on, so -p 7183 (default CM TLS port) needs to be added to the command line for the connection to succeed.

jims-air:cm_shell jhalfpenny$ ./cmps.py -H test-cluster.cloudera.com -p 7183 -t
Enter Username: admin
Enter Password:
Welcome to the Cloudera Manager Console
Select a cluster using 'show clusters' and 'use'
cloudera>

(cherry picked from commit 995297a)
We currently generate the epydocs from the publishing script, which
means someone just looking at the repo doesn't know what command line
to use. Let's add a Makefile rule to do the work.

This work is based on: cloudera#15

(cherry picked from commit 6b402f8)
gramatical typo

(cherry picked from commit ebea21f)
just a typo

(cherry picked from commit d55932e)
…son'

It's unclear if this is futile or not. I don't believe the library works
on Python < 2.6 any more, and I'm very sure unit tests don't work on
Python < 2.7.

(cherry picked from commit 2d6be54)
Tests running against older CM versions had the following
error:
    test_support_bundle45 fails with error: Unrecognized property: 'roles' (error 400)

As it turns out, we have the capability to set an API
version when using the python client, and the client
should take care of things like this, so I've done so.

To test this, I ran:

  $ cp ~/src/cm_api/python/src/cm_api/endpoints/cms.py ./target/env/lib/python2.7/site-packages/cm_api/endpoints/cms.py
  $ systest.py --agents="cdh5+parcels@nightly53-{1..4}.ent.cloudera.com" run_tests -n "test_support_bundle:SupportBundleTests.test_support_bundle_45" --disable-pre-validations  --version cm53

Before my change (that I manually cherrypicked in the first hand):

        ApiException: Unrecognized property: 'roles' (error 400)

        ----------------------------------------------------------------------
        Ran 1 test in 0.499s

        FAILED (errors=1)
        False

After:

    ***********************************************************************
    * End test_support_bundle_45 (test_support_bundle.SupportBundleTests) *
    ***********************************************************************

    ----------------------------------------------------------------------
    Ran 1 test in 128.929s

I also tested against nightly (5.5) to make sure this didn't regress.
It passed.

    $./systest.py --agents="cdh5+parcels@nightly-{1..4}.ent.cloudera.com" run_tests -n "test_support_bundle:SupportBundleTests.test_support_bundle_45"
    --disable-pre-validations

(cherry picked from commit e58b3cc)
for v11 API otherwise you get the below when you call get_all_clusters
AttributeError: Invalid property hostsUrl for class ApiCluster.
AttributeError: Invalid property entityStatus for class ApiCluster.
@mthak mthak force-pushed the master branch 2 times, most recently from f443160 to 1591b82 Compare May 7, 2016 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants