Module Expr Str Import alias Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Import alias Import alias Import alias Import alias ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad NameLoad NameLoad keyword NameLoad Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return TupleLoad NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr CompareIs NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Str NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr CompareIs NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Str NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body For NameStore ListLoad Lambda arguments args NameParam defaults NameLoad Lambda arguments args NameParam defaults Call AttributeLoad NameLoad attr Lambda arguments args NameParam defaults Call AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr ListLoad BinOpMod Str TupleLoad AttributeLoad NameLoad attr Call NameLoad Str Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr ListLoad BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr ListLoad BinOpMod Str TupleLoad AttributeLoad NameLoad attr Str Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str NameLoad Str keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr ListLoad BinOpMod Str AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str NameLoad Str keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Str decorator_list FunctionDef arguments args NameParam defaults body For NameStore ListLoad Str Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr ListLoad BinOpMod Str TupleLoad AttributeLoad NameLoad attr NameLoad Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str NameLoad Str keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If NameLoad body Assign NameStore NameLoad orelse Assign NameStore Str Return Call AttributeLoad AttributeLoad NameLoad attr attr ListLoad BinOpMod Str TupleLoad AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore Str Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad FunctionDef arguments args NameParam defaults body If CompareEq NameLoad NameLoad body Return Call AttributeLoad NameLoad attr NameLoad NameLoad ListLoad orelse Return NameLoad decorator_list For NameStore ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body If CompareEq NameLoad NameLoad body Return Call AttributeLoad NameLoad attr NameLoad NameLoad ListLoad NameLoad orelse Return NameLoad decorator_list For NameStore AttributeLoad NameLoad attr body Assign NameStore BinOpMod Str NameLoad For NameStore AttributeLoad AttributeLoad NameLoad attr attr body Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Str Str keyword NameLoad If CompareIn NameLoad TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr Continue Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Call NameLoad NameLoad Str keyword AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Call NameLoad NameLoad Str keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Call NameLoad NameLoad Str keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Call NameLoad NameLoad Str keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr If CompareEq NameLoad AttributeLoad NameLoad attr body Assign NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr Dict Str ListLoad Str orelse If CompareEq NameLoad AttributeLoad NameLoad attr body Assign NameStore BinOpMod Str NameLoad Assign NameStore Str orelse Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Call NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Str For NameStore AttributeLoad AttributeLoad NameLoad attr attr body For NameStore ListLoad NameLoad NameLoad body If BoolOpAnd CompareEq NameLoad AttributeLoad NameLoad attr UnaryOpNot NameLoad body Continue Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Str Str keyword Lambda arguments args NameParam defaults NameLoad keyword NameLoad If BoolOpAnd CompareEq NameLoad AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr orelse Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr decorator_list decorator_list ClassDef bases body FunctionDef arguments args NameParam defaults vararg kwarg body Pass decorator_list FunctionDef arguments args NameParam defaults vararg body Return Call AttributeLoad NameLoad attr keyword ListLoad decorator_list decorator_list If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr
N/A N/A Script for testing ganeti.server.rapi N/A re N/A unittest N/A random N/A mimetools N/A base64 cStringIO StringIO ganeti constants ganeti utils ganeti compat ganeti errors ganeti serializer ganeti rapi ganeti http ganeti objects ganeti.rapi.auth.basic_auth BasicAuthenticator ganeti.rapi.auth users_file N/A ganeti.rapi.testutils N/A ganeti.rapi.rlib2 N/A ganeti.http.auth N/A testutils TestRemoteApiHandler N/A N/A unittest TestCase N/A _LookupWrongUser N/A N/A _ N/A N/A N/A None N/A staticmethod _Test N/A N/A self method path headers reqbody user_fn luxi_client reqauth N/A NotImplemented NotImplemented False N/A N/A rm N/A N/A N/A rapi testutils _RapiMock N/A BasicAuthenticator user_fn luxi_client reqauth reqauth N/A N/A resp_code resp_headers resp_body N/A N/A rm FetchResponse path method N/A N/A http ParseHeaders N/A StringIO headers reqbody N/A N/A N/A self assertTrue N/A resp_headers N/A N/A http HTTP_DATE N/A N/A N/A self assertEqual N/A resp_headers N/A N/A http HTTP_CONNECTION close N/A N/A N/A self assertEqual N/A resp_headers N/A N/A http HTTP_CONTENT_TYPE N/A http HTTP_APP_JSON N/A N/A N/A self assertEqual N/A resp_headers N/A N/A http HTTP_SERVER N/A http HTTP_GANETI_VERSION N/A N/A resp_code resp_headers N/A N/A serializer LoadJson resp_body N/A testRoot N/A N/A self N/A N/A N/A N/A code _ data N/A N/A self _Test N/A http HTTP_GET / None N/A N/A N/A self assertEqual code N/A http HTTP_OK N/A N/A N/A self assertTrue N/A data None N/A testRootReqAuth N/A N/A self N/A N/A N/A N/A code _ _ N/A N/A self _Test N/A http HTTP_GET / None reqauth True N/A N/A N/A self assertEqual code N/A N/A http HttpUnauthorized code N/A testVersion N/A N/A self N/A N/A N/A N/A code _ data N/A N/A self _Test N/A http HTTP_GET /version None N/A N/A N/A self assertEqual code N/A http HTTP_OK N/A N/A N/A self assertEqual data N/A constants RAPI_VERSION N/A testSlashTwo N/A N/A self N/A N/A N/A N/A code _ data N/A N/A self _Test N/A http HTTP_GET /2 None N/A N/A N/A self assertEqual code N/A http HTTP_OK N/A N/A N/A self assertTrue N/A data None N/A testFeatures N/A N/A self N/A N/A N/A N/A code _ data N/A N/A self _Test N/A http HTTP_GET /2/features None N/A N/A N/A self assertEqual code N/A http HTTP_OK N/A N/A N/A self assertEqual N/A set data N/A set N/A N/A rapi rlib2 ALL_FEATURES N/A testPutInstances N/A N/A self N/A N/A N/A N/A code _ data N/A N/A self _Test N/A http HTTP_PUT /2/instances None N/A N/A N/A self assertEqual code N/A N/A http HttpNotImplemented code N/A N/A N/A self assertTrue N/A N/A N/A data N/A message startswith Method PUT is unsupported N/A testPostInstancesNoAuth N/A N/A self N/A N/A N/A N/A code _ _ N/A N/A self _Test N/A http HTTP_POST /2/instances None reqauth True N/A N/A N/A self assertEqual code N/A N/A http HttpUnauthorized code N/A testRequestWithUnsupportedMediaType N/A N/A self N/A N/A N/A fn N/A N/A N/A N/A s N/A s N/A N/A N/A s N/A N/A N/A s upper N/A N/A N/A s N/A N/A N/A s title N/A N/A headers N/A N/A N/A rapi testutils _FormatHeaders N/A N/A %s: %s N/A N/A http HTTP_CONTENT_TYPE N/A fn un/supported/media/type N/A N/A code _ data N/A N/A self _Test N/A http HTTP_GET / headers body N/A N/A N/A self assertEqual code N/A N/A http HttpUnsupportedMediaType code N/A N/A N/A self assertEqual N/A data N/A message Unsupported Media Type N/A testRequestWithInvalidJsonData N/A N/A self N/A N/A N/A body _this/is/no'valid.json N/A N/A N/A self assertRaises Exception N/A serializer LoadJson body N/A headers N/A N/A N/A rapi testutils _FormatHeaders N/A N/A %s: %s N/A N/A http HTTP_CONTENT_TYPE N/A http HTTP_APP_JSON N/A N/A code _ data N/A N/A self _Test N/A http HTTP_GET / headers body N/A N/A N/A self assertEqual code N/A N/A http HttpBadRequest code N/A N/A N/A self assertEqual N/A data N/A message Unable to parse JSON data N/A testUnsupportedAuthScheme N/A N/A self N/A N/A N/A headers N/A N/A N/A rapi testutils _FormatHeaders N/A N/A %s: %s N/A N/A http HTTP_AUTHORIZATION Unsupported scheme N/A N/A code _ _ N/A N/A self _Test N/A http HTTP_POST /2/instances headers reqauth True N/A N/A N/A self assertEqual code N/A N/A http HttpUnauthorized code N/A testIncompleteBasicAuth N/A N/A self N/A N/A N/A headers N/A N/A N/A rapi testutils _FormatHeaders N/A N/A %s: Basic N/A http HTTP_AUTHORIZATION N/A N/A code _ data N/A N/A self _Test N/A http HTTP_POST /2/instances headers reqauth True N/A N/A N/A self assertEqual code N/A N/A http HttpBadRequest code N/A N/A N/A self assertEqual N/A data N/A message Basic authentication requires credentials N/A testInvalidBasicAuth N/A N/A self N/A N/A N/A auth N/A !invalid=base!64. N/A N/A base64 b64encode N/A N/A base64 b64encode missingcolonchar N/A N/A headers N/A N/A N/A rapi testutils _FormatHeaders N/A N/A %s: Basic %s N/A N/A http HTTP_AUTHORIZATION auth N/A N/A code _ data N/A N/A self _Test N/A http HTTP_POST /2/instances headers reqauth True N/A N/A N/A self assertEqual code N/A N/A http HttpBadRequest code N/A _MakeAuthHeaders N/A N/A username password correct_password N/A N/A N/A correct_password N/A N/A pw password N/A N/A pw wrongpass N/A N/A N/A N/A rapi testutils _FormatHeaders N/A N/A %s: Basic %s N/A N/A http HTTP_AUTHORIZATION N/A N/A base64 b64encode N/A %s:%s N/A username pw N/A %s: %s N/A N/A http HTTP_CONTENT_TYPE N/A http HTTP_APP_JSON N/A staticmethod testQueryAuth N/A N/A self N/A N/A N/A username admin N/A password 2046920054 N/A header_fn N/A N/A compat partial N/A self _MakeAuthHeaders username password _LookupUserNoWrite N/A N/A name N/A N/A N/A N/A name username N/A N/A N/A N/A users_file PasswordFileUser name password N/A N/A N/A None N/A N/A access N/A N/A rapi RAPI_ACCESS_WRITE N/A rapi RAPI_ACCESS_READ N/A _LookupUserWithWrite N/A N/A name N/A N/A N/A N/A name username N/A N/A N/A N/A users_file PasswordFileUser name password N/A access N/A N/A None N/A N/A qr N/A constants QR_VIA_RAPI N/A N/A path N/A /2/query/%s qr N/A method N/A N/A rapi baserlib _SUPPORTED_METHODS N/A N/A N/A code _ _ N/A N/A self _Test method path reqauth True N/A N/A method N/A N/A http HTTP_DELETE N/A http HTTP_POST N/A N/A N/A N/A self assertEqual code N/A N/A http HttpNotImplemented code N/A N/A N/A N/A self assertEqual code N/A N/A http HttpUnauthorized code N/A N/A code _ _ N/A N/A self _Test method path N/A header_fn True user_fn N/A self _LookupWrongUser reqauth True N/A N/A N/A self assertEqual code N/A N/A http HttpUnauthorized code N/A N/A code _ _ N/A N/A self _Test method path N/A header_fn True user_fn _LookupUserNoWrite reqauth True N/A N/A N/A self assertEqual code N/A N/A http HttpForbidden code N/A N/A code _ _ N/A N/A self _Test method path N/A header_fn False user_fn _LookupUserNoWrite reqauth True N/A N/A N/A self assertEqual code N/A N/A http HttpUnauthorized code N/A N/A code _ _ N/A N/A self _Test method path N/A header_fn False user_fn _LookupUserWithWrite reqauth True N/A N/A N/A self assertEqual code N/A N/A http HttpUnauthorized code N/A N/A method N/A http HTTP_PUT N/A N/A reqpath path N/A body N/A N/A serializer DumpJson N/A fields N/A name N/A N/A N/A method N/A http HTTP_GET N/A N/A reqpath N/A %s?fields=name path N/A body N/A N/A N/A N/A self fail N/A Unknown method '%s' method N/A N/A code _ data N/A N/A self _Test method reqpath N/A header_fn True body user_fn _LookupUserWithWrite luxi_client _FakeLuxiClientForQuery reqauth True N/A N/A N/A self assertEqual code N/A http HTTP_OK N/A N/A N/A self assertTrue N/A N/A N/A objects QueryResponse FromDict data N/A testConsole N/A N/A self N/A N/A N/A path /2/instances/inst1.example.com/console N/A method N/A N/A rapi baserlib _SUPPORTED_METHODS N/A N/A reqauth N/A False True N/A N/A N/A N/A method N/A http HTTP_GET N/A reqauth N/A N/A N/A N/A code _ _ N/A N/A self _Test method path user_fn N/A N/A N/A _ N/A None reqauth reqauth N/A N/A N/A method N/A http HTTP_GET reqauth N/A N/A N/A N/A self assertEqual code N/A N/A http HttpUnauthorized code N/A N/A N/A N/A self assertEqual code N/A N/A http HttpNotImplemented code N/A N/A _FakeLuxiClientForQuery N/A N/A __init__ N/A N/A self N/A args kwargs N/A N/A N/A Query N/A N/A self N/A args N/A N/A N/A N/A objects QueryResponse fields N/A N/A N/A N/A N/A __name__ __main__ N/A N/A N/A N/A testutils GanetiTestProgram