From 2346f1a1e937f39343c2805d098b52f6c87f8fc9 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 14 Feb 2014 13:33:22 -0800 Subject: Swap out all-in-one file with sphinx-apidoc generated stuff --- sites/docs/api/agent.rst | 7 +++++++ sites/docs/api/auth_handler.rst | 7 +++++++ sites/docs/api/ber.rst | 7 +++++++ sites/docs/api/buffered_pipe.rst | 7 +++++++ sites/docs/api/channel.rst | 7 +++++++ sites/docs/api/client.rst | 7 +++++++ sites/docs/api/common.rst | 7 +++++++ sites/docs/api/compress.rst | 7 +++++++ sites/docs/api/config.rst | 7 +++++++ sites/docs/api/dsskey.rst | 7 +++++++ sites/docs/api/file.rst | 7 +++++++ sites/docs/api/hostkeys.rst | 7 +++++++ sites/docs/api/kex_gex.rst | 7 +++++++ sites/docs/api/kex_group1.rst | 7 +++++++ sites/docs/api/logging22.rst | 7 +++++++ sites/docs/api/message.rst | 7 +++++++ sites/docs/api/packet.rst | 7 +++++++ sites/docs/api/pipe.rst | 7 +++++++ sites/docs/api/pkey.rst | 7 +++++++ sites/docs/api/primes.rst | 7 +++++++ sites/docs/api/proxy.rst | 7 +++++++ sites/docs/api/resource.rst | 7 +++++++ sites/docs/api/rsakey.rst | 7 +++++++ sites/docs/api/server.rst | 7 +++++++ sites/docs/api/sftp.rst | 7 +++++++ sites/docs/api/sftp_attr.rst | 7 +++++++ sites/docs/api/sftp_client.rst | 7 +++++++ sites/docs/api/sftp_file.rst | 7 +++++++ sites/docs/api/sftp_handle.rst | 7 +++++++ sites/docs/api/sftp_server.rst | 7 +++++++ sites/docs/api/sftp_si.rst | 7 +++++++ sites/docs/api/ssh_exception.rst | 7 +++++++ sites/docs/api/transport.rst | 7 +++++++ sites/docs/api/util.rst | 7 +++++++ sites/docs/api/win_pageant.rst | 7 +++++++ 35 files changed, 245 insertions(+) create mode 100644 sites/docs/api/agent.rst create mode 100644 sites/docs/api/auth_handler.rst create mode 100644 sites/docs/api/ber.rst create mode 100644 sites/docs/api/buffered_pipe.rst create mode 100644 sites/docs/api/channel.rst create mode 100644 sites/docs/api/client.rst create mode 100644 sites/docs/api/common.rst create mode 100644 sites/docs/api/compress.rst create mode 100644 sites/docs/api/config.rst create mode 100644 sites/docs/api/dsskey.rst create mode 100644 sites/docs/api/file.rst create mode 100644 sites/docs/api/hostkeys.rst create mode 100644 sites/docs/api/kex_gex.rst create mode 100644 sites/docs/api/kex_group1.rst create mode 100644 sites/docs/api/logging22.rst create mode 100644 sites/docs/api/message.rst create mode 100644 sites/docs/api/packet.rst create mode 100644 sites/docs/api/pipe.rst create mode 100644 sites/docs/api/pkey.rst create mode 100644 sites/docs/api/primes.rst create mode 100644 sites/docs/api/proxy.rst create mode 100644 sites/docs/api/resource.rst create mode 100644 sites/docs/api/rsakey.rst create mode 100644 sites/docs/api/server.rst create mode 100644 sites/docs/api/sftp.rst create mode 100644 sites/docs/api/sftp_attr.rst create mode 100644 sites/docs/api/sftp_client.rst create mode 100644 sites/docs/api/sftp_file.rst create mode 100644 sites/docs/api/sftp_handle.rst create mode 100644 sites/docs/api/sftp_server.rst create mode 100644 sites/docs/api/sftp_si.rst create mode 100644 sites/docs/api/ssh_exception.rst create mode 100644 sites/docs/api/transport.rst create mode 100644 sites/docs/api/util.rst create mode 100644 sites/docs/api/win_pageant.rst (limited to 'sites/docs/api') diff --git a/sites/docs/api/agent.rst b/sites/docs/api/agent.rst new file mode 100644 index 00000000..cb966f2b --- /dev/null +++ b/sites/docs/api/agent.rst @@ -0,0 +1,7 @@ +paramiko.agent module +===================== + +.. automodule:: paramiko.agent + :members: + :undoc-members: + :show-inheritance: diff --git a/sites/docs/api/auth_handler.rst b/sites/docs/api/auth_handler.rst new file mode 100644 index 00000000..c35f5b66 --- /dev/null +++ b/sites/docs/api/auth_handler.rst @@ -0,0 +1,7 @@ +paramiko.auth_handler module +============================ + +.. automodule:: paramiko.auth_handler + :members: + :undoc-members: + :show-inheritance: diff --git a/sites/docs/api/ber.rst b/sites/docs/api/ber.rst new file mode 100644 index 00000000..3627528f --- /dev/null +++ b/sites/docs/api/ber.rst @@ -0,0 +1,7 @@ +paramiko.ber module +=================== + +.. automodule:: paramiko.ber + :members: + :undoc-members: + :show-inheritance: diff --git a/sites/docs/api/buffered_pipe.rst b/sites/docs/api/buffered_pipe.rst new file mode 100644 index 00000000..57411fc7 --- /dev/null +++ b/sites/docs/api/buffered_pipe.rst @@ -0,0 +1,7 @@ +paramiko.buffered_pipe module +============================= + +.. automodule:: paramiko.buffered_pipe + :members: + :undoc-members: + :show-inheritance: diff --git a/sites/docs/api/channel.rst b/sites/docs/api/channel.rst new file mode 100644 index 00000000..85848484 --- /dev/null +++ b/sites/docs/api/channel.rst @@ -0,0 +1,7 @@ +paramiko.channel module +======================= + +.. automodule:: paramiko.channel + :members: + :undoc-members: + :show-inheritance: diff --git a/sites/docs/api/client.rst b/sites/docs/api/client.rst new file mode 100644 index 00000000..50171371 --- /dev/null +++ b/sites/docs/api/client.rst @@ -0,0 +1,7 @@ +paramiko.client module +====================== + +.. automodule:: paramiko.client + :members: + :undoc-members: + :show-inheritance: diff --git a/sites/docs/api/common.rst b/sites/docs/api/common.rst new file mode 100644 index 00000000..0abcf986 --- /dev/null +++ b/sites/docs/api/common.rst @@ -0,0 +1,7 @@ +paramiko.common module +====================== + +.. automodule:: paramiko.common + :members: + :undoc-members: + :show-inheritance: diff --git a/sites/docs/api/compress.rst b/sites/docs/api/compress.rst new file mode 100644 index 00000000..9089efbd --- /dev/null +++ b/sites/docs/api/compress.rst @@ -0,0 +1,7 @@ +paramiko.compress module +======================== + +.. automodule:: paramiko.compress + :members: + :undoc-members: + :show-inheritance: diff --git a/sites/docs/api/config.rst b/sites/docs/api/config.rst new file mode 100644 index 00000000..fb587953 --- /dev/null +++ b/sites/docs/api/config.rst @@ -0,0 +1,7 @@ +paramiko.config module +====================== + +.. automodule:: paramiko.config + :members: + :undoc-members: + :show-inheritance: diff --git a/sites/docs/api/dsskey.rst b/sites/docs/api/dsskey.rst new file mode 100644 index 00000000..67fbd84e --- /dev/null +++ b/sites/docs/api/dsskey.rst @@ -0,0 +1,7 @@ +paramiko.dsskey module +====================== + +.. automodule:: paramiko.dsskey + :members: + :undoc-members: + :show-inheritance: diff --git a/sites/docs/api/file.rst b/sites/docs/api/file.rst new file mode 100644 index 00000000..044ceab0 --- /dev/null +++ b/sites/docs/api/file.rst @@ -0,0 +1,7 @@ +paramiko.file module +==================== + +.. automodule:: paramiko.file + :members: + :undoc-members: + :show-inheritance: diff --git a/sites/docs/api/hostkeys.rst b/sites/docs/api/hostkeys.rst new file mode 100644 index 00000000..0428fa92 --- /dev/null +++ b/sites/docs/api/hostkeys.rst @@ -0,0 +1,7 @@ +paramiko.hostkeys module +======================== + +.. automodule:: paramiko.hostkeys + :members: + :undoc-members: + :show-inheritance: diff --git a/sites/docs/api/kex_gex.rst b/sites/docs/api/kex_gex.rst new file mode 100644 index 00000000..749853b3 --- /dev/null +++ b/sites/docs/api/kex_gex.rst @@ -0,0 +1,7 @@ +paramiko.kex_gex module +======================= + +.. automodule:: paramiko.kex_gex + :members: + :undoc-members: + :show-inheritance: diff --git a/sites/docs/api/kex_group1.rst b/sites/docs/api/kex_group1.rst new file mode 100644 index 00000000..8bef58d0 --- /dev/null +++ b/sites/docs/api/kex_group1.rst @@ -0,0 +1,7 @@ +paramiko.kex_group1 module +========================== + +.. automodule:: paramiko.kex_group1 + :members: + :undoc-members: + :show-inheritance: diff --git a/sites/docs/api/logging22.rst b/sites/docs/api/logging22.rst new file mode 100644 index 00000000..55c17882 --- /dev/null +++ b/sites/docs/api/logging22.rst @@ -0,0 +1,7 @@ +paramiko.logging22 module +========================= + +.. automodule:: paramiko.logging22 + :members: + :undoc-members: + :show-inheritance: diff --git a/sites/docs/api/message.rst b/sites/docs/api/message.rst new file mode 100644 index 00000000..4f7b5838 --- /dev/null +++ b/sites/docs/api/message.rst @@ -0,0 +1,7 @@ +paramiko.message module +======================= + +.. automodule:: paramiko.message + :members: + :undoc-members: + :show-inheritance: diff --git a/sites/docs/api/packet.rst b/sites/docs/api/packet.rst new file mode 100644 index 00000000..6a127d7a --- /dev/null +++ b/sites/docs/api/packet.rst @@ -0,0 +1,7 @@ +paramiko.packet module +====================== + +.. automodule:: paramiko.packet + :members: + :undoc-members: + :show-inheritance: diff --git a/sites/docs/api/pipe.rst b/sites/docs/api/pipe.rst new file mode 100644 index 00000000..5ec75fa5 --- /dev/null +++ b/sites/docs/api/pipe.rst @@ -0,0 +1,7 @@ +paramiko.pipe module +==================== + +.. automodule:: paramiko.pipe + :members: + :undoc-members: + :show-inheritance: diff --git a/sites/docs/api/pkey.rst b/sites/docs/api/pkey.rst new file mode 100644 index 00000000..fb75e664 --- /dev/null +++ b/sites/docs/api/pkey.rst @@ -0,0 +1,7 @@ +paramiko.pkey module +==================== + +.. automodule:: paramiko.pkey + :members: + :undoc-members: + :show-inheritance: diff --git a/sites/docs/api/primes.rst b/sites/docs/api/primes.rst new file mode 100644 index 00000000..8dfe2a47 --- /dev/null +++ b/sites/docs/api/primes.rst @@ -0,0 +1,7 @@ +paramiko.primes module +====================== + +.. automodule:: paramiko.primes + :members: + :undoc-members: + :show-inheritance: diff --git a/sites/docs/api/proxy.rst b/sites/docs/api/proxy.rst new file mode 100644 index 00000000..5a0f5aff --- /dev/null +++ b/sites/docs/api/proxy.rst @@ -0,0 +1,7 @@ +paramiko.proxy module +===================== + +.. automodule:: paramiko.proxy + :members: + :undoc-members: + :show-inheritance: diff --git a/sites/docs/api/resource.rst b/sites/docs/api/resource.rst new file mode 100644 index 00000000..a4527ab1 --- /dev/null +++ b/sites/docs/api/resource.rst @@ -0,0 +1,7 @@ +paramiko.resource module +======================== + +.. automodule:: paramiko.resource + :members: + :undoc-members: + :show-inheritance: diff --git a/sites/docs/api/rsakey.rst b/sites/docs/api/rsakey.rst new file mode 100644 index 00000000..7ad995ce --- /dev/null +++ b/sites/docs/api/rsakey.rst @@ -0,0 +1,7 @@ +paramiko.rsakey module +====================== + +.. automodule:: paramiko.rsakey + :members: + :undoc-members: + :show-inheritance: diff --git a/sites/docs/api/server.rst b/sites/docs/api/server.rst new file mode 100644 index 00000000..3821c9be --- /dev/null +++ b/sites/docs/api/server.rst @@ -0,0 +1,7 @@ +paramiko.server module +====================== + +.. automodule:: paramiko.server + :members: + :undoc-members: + :show-inheritance: diff --git a/sites/docs/api/sftp.rst b/sites/docs/api/sftp.rst new file mode 100644 index 00000000..1d65900a --- /dev/null +++ b/sites/docs/api/sftp.rst @@ -0,0 +1,7 @@ +paramiko.sftp module +==================== + +.. automodule:: paramiko.sftp + :members: + :undoc-members: + :show-inheritance: diff --git a/sites/docs/api/sftp_attr.rst b/sites/docs/api/sftp_attr.rst new file mode 100644 index 00000000..114748c6 --- /dev/null +++ b/sites/docs/api/sftp_attr.rst @@ -0,0 +1,7 @@ +paramiko.sftp_attr module +========================= + +.. automodule:: paramiko.sftp_attr + :members: + :undoc-members: + :show-inheritance: diff --git a/sites/docs/api/sftp_client.rst b/sites/docs/api/sftp_client.rst new file mode 100644 index 00000000..ee973df2 --- /dev/null +++ b/sites/docs/api/sftp_client.rst @@ -0,0 +1,7 @@ +paramiko.sftp_client module +=========================== + +.. automodule:: paramiko.sftp_client + :members: + :undoc-members: + :show-inheritance: diff --git a/sites/docs/api/sftp_file.rst b/sites/docs/api/sftp_file.rst new file mode 100644 index 00000000..77756807 --- /dev/null +++ b/sites/docs/api/sftp_file.rst @@ -0,0 +1,7 @@ +paramiko.sftp_file module +========================= + +.. automodule:: paramiko.sftp_file + :members: + :undoc-members: + :show-inheritance: diff --git a/sites/docs/api/sftp_handle.rst b/sites/docs/api/sftp_handle.rst new file mode 100644 index 00000000..0f563b16 --- /dev/null +++ b/sites/docs/api/sftp_handle.rst @@ -0,0 +1,7 @@ +paramiko.sftp_handle module +=========================== + +.. automodule:: paramiko.sftp_handle + :members: + :undoc-members: + :show-inheritance: diff --git a/sites/docs/api/sftp_server.rst b/sites/docs/api/sftp_server.rst new file mode 100644 index 00000000..50e84b18 --- /dev/null +++ b/sites/docs/api/sftp_server.rst @@ -0,0 +1,7 @@ +paramiko.sftp_server module +=========================== + +.. automodule:: paramiko.sftp_server + :members: + :undoc-members: + :show-inheritance: diff --git a/sites/docs/api/sftp_si.rst b/sites/docs/api/sftp_si.rst new file mode 100644 index 00000000..e369d879 --- /dev/null +++ b/sites/docs/api/sftp_si.rst @@ -0,0 +1,7 @@ +paramiko.sftp_si module +======================= + +.. automodule:: paramiko.sftp_si + :members: + :undoc-members: + :show-inheritance: diff --git a/sites/docs/api/ssh_exception.rst b/sites/docs/api/ssh_exception.rst new file mode 100644 index 00000000..a4b6d2aa --- /dev/null +++ b/sites/docs/api/ssh_exception.rst @@ -0,0 +1,7 @@ +paramiko.ssh_exception module +============================= + +.. automodule:: paramiko.ssh_exception + :members: + :undoc-members: + :show-inheritance: diff --git a/sites/docs/api/transport.rst b/sites/docs/api/transport.rst new file mode 100644 index 00000000..19fb0e88 --- /dev/null +++ b/sites/docs/api/transport.rst @@ -0,0 +1,7 @@ +paramiko.transport module +========================= + +.. automodule:: paramiko.transport + :members: + :undoc-members: + :show-inheritance: diff --git a/sites/docs/api/util.rst b/sites/docs/api/util.rst new file mode 100644 index 00000000..ae3eae0f --- /dev/null +++ b/sites/docs/api/util.rst @@ -0,0 +1,7 @@ +paramiko.util module +==================== + +.. automodule:: paramiko.util + :members: + :undoc-members: + :show-inheritance: diff --git a/sites/docs/api/win_pageant.rst b/sites/docs/api/win_pageant.rst new file mode 100644 index 00000000..561a5143 --- /dev/null +++ b/sites/docs/api/win_pageant.rst @@ -0,0 +1,7 @@ +paramiko.win_pageant module +=========================== + +.. automodule:: paramiko.win_pageant + :members: + :undoc-members: + :show-inheritance: -- cgit v1.2.3 From 95b5fd22559e3e24e125471a99962601b490b965 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 14 Feb 2014 15:48:39 -0800 Subject: Remove autodoc boilerplate flags from automodule directives --- sites/docs/api/agent.rst | 3 --- sites/docs/api/auth_handler.rst | 3 --- sites/docs/api/ber.rst | 3 --- sites/docs/api/buffered_pipe.rst | 3 --- sites/docs/api/channel.rst | 3 --- sites/docs/api/client.rst | 3 --- sites/docs/api/common.rst | 3 --- sites/docs/api/compress.rst | 3 --- sites/docs/api/config.rst | 3 --- sites/docs/api/dsskey.rst | 3 --- sites/docs/api/file.rst | 3 --- sites/docs/api/hostkeys.rst | 3 --- sites/docs/api/kex_gex.rst | 3 --- sites/docs/api/kex_group1.rst | 3 --- sites/docs/api/logging22.rst | 3 --- sites/docs/api/message.rst | 3 --- sites/docs/api/packet.rst | 3 --- sites/docs/api/pipe.rst | 3 --- sites/docs/api/pkey.rst | 3 --- sites/docs/api/primes.rst | 3 --- sites/docs/api/proxy.rst | 3 --- sites/docs/api/resource.rst | 3 --- sites/docs/api/rsakey.rst | 3 --- sites/docs/api/server.rst | 3 --- sites/docs/api/sftp.rst | 3 --- sites/docs/api/sftp_attr.rst | 3 --- sites/docs/api/sftp_client.rst | 3 --- sites/docs/api/sftp_file.rst | 3 --- sites/docs/api/sftp_handle.rst | 3 --- sites/docs/api/sftp_server.rst | 3 --- sites/docs/api/sftp_si.rst | 3 --- sites/docs/api/ssh_exception.rst | 3 --- sites/docs/api/transport.rst | 3 --- sites/docs/api/util.rst | 3 --- sites/docs/api/win_pageant.rst | 3 --- 35 files changed, 105 deletions(-) (limited to 'sites/docs/api') diff --git a/sites/docs/api/agent.rst b/sites/docs/api/agent.rst index cb966f2b..26d9c97a 100644 --- a/sites/docs/api/agent.rst +++ b/sites/docs/api/agent.rst @@ -2,6 +2,3 @@ paramiko.agent module ===================== .. automodule:: paramiko.agent - :members: - :undoc-members: - :show-inheritance: diff --git a/sites/docs/api/auth_handler.rst b/sites/docs/api/auth_handler.rst index c35f5b66..0fdb490f 100644 --- a/sites/docs/api/auth_handler.rst +++ b/sites/docs/api/auth_handler.rst @@ -2,6 +2,3 @@ paramiko.auth_handler module ============================ .. automodule:: paramiko.auth_handler - :members: - :undoc-members: - :show-inheritance: diff --git a/sites/docs/api/ber.rst b/sites/docs/api/ber.rst index 3627528f..20ab604e 100644 --- a/sites/docs/api/ber.rst +++ b/sites/docs/api/ber.rst @@ -2,6 +2,3 @@ paramiko.ber module =================== .. automodule:: paramiko.ber - :members: - :undoc-members: - :show-inheritance: diff --git a/sites/docs/api/buffered_pipe.rst b/sites/docs/api/buffered_pipe.rst index 57411fc7..a8cdb581 100644 --- a/sites/docs/api/buffered_pipe.rst +++ b/sites/docs/api/buffered_pipe.rst @@ -2,6 +2,3 @@ paramiko.buffered_pipe module ============================= .. automodule:: paramiko.buffered_pipe - :members: - :undoc-members: - :show-inheritance: diff --git a/sites/docs/api/channel.rst b/sites/docs/api/channel.rst index 85848484..db8280b5 100644 --- a/sites/docs/api/channel.rst +++ b/sites/docs/api/channel.rst @@ -2,6 +2,3 @@ paramiko.channel module ======================= .. automodule:: paramiko.channel - :members: - :undoc-members: - :show-inheritance: diff --git a/sites/docs/api/client.rst b/sites/docs/api/client.rst index 50171371..840ffec8 100644 --- a/sites/docs/api/client.rst +++ b/sites/docs/api/client.rst @@ -2,6 +2,3 @@ paramiko.client module ====================== .. automodule:: paramiko.client - :members: - :undoc-members: - :show-inheritance: diff --git a/sites/docs/api/common.rst b/sites/docs/api/common.rst index 0abcf986..fb99f218 100644 --- a/sites/docs/api/common.rst +++ b/sites/docs/api/common.rst @@ -2,6 +2,3 @@ paramiko.common module ====================== .. automodule:: paramiko.common - :members: - :undoc-members: - :show-inheritance: diff --git a/sites/docs/api/compress.rst b/sites/docs/api/compress.rst index 9089efbd..93e04231 100644 --- a/sites/docs/api/compress.rst +++ b/sites/docs/api/compress.rst @@ -2,6 +2,3 @@ paramiko.compress module ======================== .. automodule:: paramiko.compress - :members: - :undoc-members: - :show-inheritance: diff --git a/sites/docs/api/config.rst b/sites/docs/api/config.rst index fb587953..dc030b48 100644 --- a/sites/docs/api/config.rst +++ b/sites/docs/api/config.rst @@ -2,6 +2,3 @@ paramiko.config module ====================== .. automodule:: paramiko.config - :members: - :undoc-members: - :show-inheritance: diff --git a/sites/docs/api/dsskey.rst b/sites/docs/api/dsskey.rst index 67fbd84e..c4d8d652 100644 --- a/sites/docs/api/dsskey.rst +++ b/sites/docs/api/dsskey.rst @@ -2,6 +2,3 @@ paramiko.dsskey module ====================== .. automodule:: paramiko.dsskey - :members: - :undoc-members: - :show-inheritance: diff --git a/sites/docs/api/file.rst b/sites/docs/api/file.rst index 044ceab0..d16c834f 100644 --- a/sites/docs/api/file.rst +++ b/sites/docs/api/file.rst @@ -2,6 +2,3 @@ paramiko.file module ==================== .. automodule:: paramiko.file - :members: - :undoc-members: - :show-inheritance: diff --git a/sites/docs/api/hostkeys.rst b/sites/docs/api/hostkeys.rst index 0428fa92..5379a369 100644 --- a/sites/docs/api/hostkeys.rst +++ b/sites/docs/api/hostkeys.rst @@ -2,6 +2,3 @@ paramiko.hostkeys module ======================== .. automodule:: paramiko.hostkeys - :members: - :undoc-members: - :show-inheritance: diff --git a/sites/docs/api/kex_gex.rst b/sites/docs/api/kex_gex.rst index 749853b3..9b5ff543 100644 --- a/sites/docs/api/kex_gex.rst +++ b/sites/docs/api/kex_gex.rst @@ -2,6 +2,3 @@ paramiko.kex_gex module ======================= .. automodule:: paramiko.kex_gex - :members: - :undoc-members: - :show-inheritance: diff --git a/sites/docs/api/kex_group1.rst b/sites/docs/api/kex_group1.rst index 8bef58d0..47089326 100644 --- a/sites/docs/api/kex_group1.rst +++ b/sites/docs/api/kex_group1.rst @@ -2,6 +2,3 @@ paramiko.kex_group1 module ========================== .. automodule:: paramiko.kex_group1 - :members: - :undoc-members: - :show-inheritance: diff --git a/sites/docs/api/logging22.rst b/sites/docs/api/logging22.rst index 55c17882..fad43489 100644 --- a/sites/docs/api/logging22.rst +++ b/sites/docs/api/logging22.rst @@ -2,6 +2,3 @@ paramiko.logging22 module ========================= .. automodule:: paramiko.logging22 - :members: - :undoc-members: - :show-inheritance: diff --git a/sites/docs/api/message.rst b/sites/docs/api/message.rst index 4f7b5838..e660ef89 100644 --- a/sites/docs/api/message.rst +++ b/sites/docs/api/message.rst @@ -2,6 +2,3 @@ paramiko.message module ======================= .. automodule:: paramiko.message - :members: - :undoc-members: - :show-inheritance: diff --git a/sites/docs/api/packet.rst b/sites/docs/api/packet.rst index 6a127d7a..ab7c6b45 100644 --- a/sites/docs/api/packet.rst +++ b/sites/docs/api/packet.rst @@ -2,6 +2,3 @@ paramiko.packet module ====================== .. automodule:: paramiko.packet - :members: - :undoc-members: - :show-inheritance: diff --git a/sites/docs/api/pipe.rst b/sites/docs/api/pipe.rst index 5ec75fa5..220dbc87 100644 --- a/sites/docs/api/pipe.rst +++ b/sites/docs/api/pipe.rst @@ -2,6 +2,3 @@ paramiko.pipe module ==================== .. automodule:: paramiko.pipe - :members: - :undoc-members: - :show-inheritance: diff --git a/sites/docs/api/pkey.rst b/sites/docs/api/pkey.rst index fb75e664..418736b7 100644 --- a/sites/docs/api/pkey.rst +++ b/sites/docs/api/pkey.rst @@ -2,6 +2,3 @@ paramiko.pkey module ==================== .. automodule:: paramiko.pkey - :members: - :undoc-members: - :show-inheritance: diff --git a/sites/docs/api/primes.rst b/sites/docs/api/primes.rst index 8dfe2a47..4d7a1f58 100644 --- a/sites/docs/api/primes.rst +++ b/sites/docs/api/primes.rst @@ -2,6 +2,3 @@ paramiko.primes module ====================== .. automodule:: paramiko.primes - :members: - :undoc-members: - :show-inheritance: diff --git a/sites/docs/api/proxy.rst b/sites/docs/api/proxy.rst index 5a0f5aff..e3cf59ca 100644 --- a/sites/docs/api/proxy.rst +++ b/sites/docs/api/proxy.rst @@ -2,6 +2,3 @@ paramiko.proxy module ===================== .. automodule:: paramiko.proxy - :members: - :undoc-members: - :show-inheritance: diff --git a/sites/docs/api/resource.rst b/sites/docs/api/resource.rst index a4527ab1..c4c548f4 100644 --- a/sites/docs/api/resource.rst +++ b/sites/docs/api/resource.rst @@ -2,6 +2,3 @@ paramiko.resource module ======================== .. automodule:: paramiko.resource - :members: - :undoc-members: - :show-inheritance: diff --git a/sites/docs/api/rsakey.rst b/sites/docs/api/rsakey.rst index 7ad995ce..77dbd894 100644 --- a/sites/docs/api/rsakey.rst +++ b/sites/docs/api/rsakey.rst @@ -2,6 +2,3 @@ paramiko.rsakey module ====================== .. automodule:: paramiko.rsakey - :members: - :undoc-members: - :show-inheritance: diff --git a/sites/docs/api/server.rst b/sites/docs/api/server.rst index 3821c9be..f59b1216 100644 --- a/sites/docs/api/server.rst +++ b/sites/docs/api/server.rst @@ -2,6 +2,3 @@ paramiko.server module ====================== .. automodule:: paramiko.server - :members: - :undoc-members: - :show-inheritance: diff --git a/sites/docs/api/sftp.rst b/sites/docs/api/sftp.rst index 1d65900a..731c2521 100644 --- a/sites/docs/api/sftp.rst +++ b/sites/docs/api/sftp.rst @@ -2,6 +2,3 @@ paramiko.sftp module ==================== .. automodule:: paramiko.sftp - :members: - :undoc-members: - :show-inheritance: diff --git a/sites/docs/api/sftp_attr.rst b/sites/docs/api/sftp_attr.rst index 114748c6..98bce03a 100644 --- a/sites/docs/api/sftp_attr.rst +++ b/sites/docs/api/sftp_attr.rst @@ -2,6 +2,3 @@ paramiko.sftp_attr module ========================= .. automodule:: paramiko.sftp_attr - :members: - :undoc-members: - :show-inheritance: diff --git a/sites/docs/api/sftp_client.rst b/sites/docs/api/sftp_client.rst index ee973df2..9892befe 100644 --- a/sites/docs/api/sftp_client.rst +++ b/sites/docs/api/sftp_client.rst @@ -2,6 +2,3 @@ paramiko.sftp_client module =========================== .. automodule:: paramiko.sftp_client - :members: - :undoc-members: - :show-inheritance: diff --git a/sites/docs/api/sftp_file.rst b/sites/docs/api/sftp_file.rst index 77756807..7df6e12b 100644 --- a/sites/docs/api/sftp_file.rst +++ b/sites/docs/api/sftp_file.rst @@ -2,6 +2,3 @@ paramiko.sftp_file module ========================= .. automodule:: paramiko.sftp_file - :members: - :undoc-members: - :show-inheritance: diff --git a/sites/docs/api/sftp_handle.rst b/sites/docs/api/sftp_handle.rst index 0f563b16..1d1c30ed 100644 --- a/sites/docs/api/sftp_handle.rst +++ b/sites/docs/api/sftp_handle.rst @@ -2,6 +2,3 @@ paramiko.sftp_handle module =========================== .. automodule:: paramiko.sftp_handle - :members: - :undoc-members: - :show-inheritance: diff --git a/sites/docs/api/sftp_server.rst b/sites/docs/api/sftp_server.rst index 50e84b18..82a6976e 100644 --- a/sites/docs/api/sftp_server.rst +++ b/sites/docs/api/sftp_server.rst @@ -2,6 +2,3 @@ paramiko.sftp_server module =========================== .. automodule:: paramiko.sftp_server - :members: - :undoc-members: - :show-inheritance: diff --git a/sites/docs/api/sftp_si.rst b/sites/docs/api/sftp_si.rst index e369d879..d071e61a 100644 --- a/sites/docs/api/sftp_si.rst +++ b/sites/docs/api/sftp_si.rst @@ -2,6 +2,3 @@ paramiko.sftp_si module ======================= .. automodule:: paramiko.sftp_si - :members: - :undoc-members: - :show-inheritance: diff --git a/sites/docs/api/ssh_exception.rst b/sites/docs/api/ssh_exception.rst index a4b6d2aa..7faaf5f4 100644 --- a/sites/docs/api/ssh_exception.rst +++ b/sites/docs/api/ssh_exception.rst @@ -2,6 +2,3 @@ paramiko.ssh_exception module ============================= .. automodule:: paramiko.ssh_exception - :members: - :undoc-members: - :show-inheritance: diff --git a/sites/docs/api/transport.rst b/sites/docs/api/transport.rst index 19fb0e88..6f5b1cd9 100644 --- a/sites/docs/api/transport.rst +++ b/sites/docs/api/transport.rst @@ -2,6 +2,3 @@ paramiko.transport module ========================= .. automodule:: paramiko.transport - :members: - :undoc-members: - :show-inheritance: diff --git a/sites/docs/api/util.rst b/sites/docs/api/util.rst index ae3eae0f..de383ae1 100644 --- a/sites/docs/api/util.rst +++ b/sites/docs/api/util.rst @@ -2,6 +2,3 @@ paramiko.util module ==================== .. automodule:: paramiko.util - :members: - :undoc-members: - :show-inheritance: diff --git a/sites/docs/api/win_pageant.rst b/sites/docs/api/win_pageant.rst index 561a5143..9b488080 100644 --- a/sites/docs/api/win_pageant.rst +++ b/sites/docs/api/win_pageant.rst @@ -2,6 +2,3 @@ paramiko.win_pageant module =========================== .. automodule:: paramiko.win_pageant - :members: - :undoc-members: - :show-inheritance: -- cgit v1.2.3 From e0ff365388702492b83816a42cc6e692cd15c542 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 14 Feb 2014 16:50:16 -0800 Subject: Agent title --- sites/docs/api/agent.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sites/docs/api') diff --git a/sites/docs/api/agent.rst b/sites/docs/api/agent.rst index 26d9c97a..74edc184 100644 --- a/sites/docs/api/agent.rst +++ b/sites/docs/api/agent.rst @@ -1,4 +1,4 @@ -paramiko.agent module -===================== +Agent +===== .. automodule:: paramiko.agent -- cgit v1.2.3 From 70218ff852370e78e85425c22c100895f805c5a3 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 14 Feb 2014 16:50:32 -0800 Subject: Auth handler is purely internal and has no docstrings --- sites/docs/api/auth_handler.rst | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 sites/docs/api/auth_handler.rst (limited to 'sites/docs/api') diff --git a/sites/docs/api/auth_handler.rst b/sites/docs/api/auth_handler.rst deleted file mode 100644 index 0fdb490f..00000000 --- a/sites/docs/api/auth_handler.rst +++ /dev/null @@ -1,4 +0,0 @@ -paramiko.auth_handler module -============================ - -.. automodule:: paramiko.auth_handler -- cgit v1.2.3 From f855937d10857a39c63783b610a2838e2fa8400d Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 14 Feb 2014 16:50:56 -0800 Subject: Ditto for BER --- sites/docs/api/ber.rst | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 sites/docs/api/ber.rst (limited to 'sites/docs/api') diff --git a/sites/docs/api/ber.rst b/sites/docs/api/ber.rst deleted file mode 100644 index 20ab604e..00000000 --- a/sites/docs/api/ber.rst +++ /dev/null @@ -1,4 +0,0 @@ -paramiko.ber module -=================== - -.. automodule:: paramiko.ber -- cgit v1.2.3 From 34243a4aa28192c30e80a7d61271623d397deb86 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 14 Feb 2014 16:51:59 -0800 Subject: Buffered pipe --- sites/docs/api/buffered_pipe.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sites/docs/api') diff --git a/sites/docs/api/buffered_pipe.rst b/sites/docs/api/buffered_pipe.rst index a8cdb581..54d87c59 100644 --- a/sites/docs/api/buffered_pipe.rst +++ b/sites/docs/api/buffered_pipe.rst @@ -1,4 +1,4 @@ -paramiko.buffered_pipe module -============================= +Buffered pipes +============== .. automodule:: paramiko.buffered_pipe -- cgit v1.2.3 From 6ff6e149789cbb8fb9a7791e601737044b931716 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 14 Feb 2014 16:54:50 -0800 Subject: Moar headers. Going with plural where appropriate. --- sites/docs/api/agent.rst | 4 ++-- sites/docs/api/channel.rst | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'sites/docs/api') diff --git a/sites/docs/api/agent.rst b/sites/docs/api/agent.rst index 74edc184..789f7b1d 100644 --- a/sites/docs/api/agent.rst +++ b/sites/docs/api/agent.rst @@ -1,4 +1,4 @@ -Agent -===== +SSH Agents +========== .. automodule:: paramiko.agent diff --git a/sites/docs/api/channel.rst b/sites/docs/api/channel.rst index db8280b5..3edb8ac7 100644 --- a/sites/docs/api/channel.rst +++ b/sites/docs/api/channel.rst @@ -1,4 +1,4 @@ -paramiko.channel module -======================= +Channels +======== .. automodule:: paramiko.channel -- cgit v1.2.3 From ef9c0a655ad08d74747281499081d0b8c92c936f Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 14 Feb 2014 17:02:13 -0800 Subject: Common module has no interesting docs in it Also no clear way to auto-display all data members versus using a bunch of awful explicit autodata:: directives. Can dig later if anybody cares. --- sites/docs/api/common.rst | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 sites/docs/api/common.rst (limited to 'sites/docs/api') diff --git a/sites/docs/api/common.rst b/sites/docs/api/common.rst deleted file mode 100644 index fb99f218..00000000 --- a/sites/docs/api/common.rst +++ /dev/null @@ -1,4 +0,0 @@ -paramiko.common module -====================== - -.. automodule:: paramiko.common -- cgit v1.2.3 From a67142b1cae4fb04fc99df706b8b9b92337ee88f Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 14 Feb 2014 17:03:02 -0800 Subject: Moar header --- sites/docs/api/client.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sites/docs/api') diff --git a/sites/docs/api/client.rst b/sites/docs/api/client.rst index 840ffec8..a0784d09 100644 --- a/sites/docs/api/client.rst +++ b/sites/docs/api/client.rst @@ -1,4 +1,4 @@ -paramiko.client module -====================== +Clients +======= .. automodule:: paramiko.client -- cgit v1.2.3 From 6d412b06a16a12169f0f71927fbef11638242700 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 14 Feb 2014 17:03:12 -0800 Subject: Another undocumented/internal module --- sites/docs/api/compress.rst | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 sites/docs/api/compress.rst (limited to 'sites/docs/api') diff --git a/sites/docs/api/compress.rst b/sites/docs/api/compress.rst deleted file mode 100644 index 93e04231..00000000 --- a/sites/docs/api/compress.rst +++ /dev/null @@ -1,4 +0,0 @@ -paramiko.compress module -======================== - -.. automodule:: paramiko.compress -- cgit v1.2.3 From 48adf5c646c8a2fe86a6670f54a434533814ab89 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 14 Feb 2014 17:05:05 -0800 Subject: Consolidate rsa/dss keys into one doc module --- sites/docs/api/dsskey.rst | 4 ---- sites/docs/api/keys.rst | 5 +++++ sites/docs/api/rsakey.rst | 4 ---- 3 files changed, 5 insertions(+), 8 deletions(-) delete mode 100644 sites/docs/api/dsskey.rst create mode 100644 sites/docs/api/keys.rst delete mode 100644 sites/docs/api/rsakey.rst (limited to 'sites/docs/api') diff --git a/sites/docs/api/dsskey.rst b/sites/docs/api/dsskey.rst deleted file mode 100644 index c4d8d652..00000000 --- a/sites/docs/api/dsskey.rst +++ /dev/null @@ -1,4 +0,0 @@ -paramiko.dsskey module -====================== - -.. automodule:: paramiko.dsskey diff --git a/sites/docs/api/keys.rst b/sites/docs/api/keys.rst new file mode 100644 index 00000000..ca09a878 --- /dev/null +++ b/sites/docs/api/keys.rst @@ -0,0 +1,5 @@ +Key handling +============ + +.. automodule:: paramiko.dsskey +.. automodule:: paramiko.rsakey diff --git a/sites/docs/api/rsakey.rst b/sites/docs/api/rsakey.rst deleted file mode 100644 index 77dbd894..00000000 --- a/sites/docs/api/rsakey.rst +++ /dev/null @@ -1,4 +0,0 @@ -paramiko.rsakey module -====================== - -.. automodule:: paramiko.rsakey -- cgit v1.2.3 From 370af8979145ef09dbf606677d1d4d7f61b67281 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 14 Feb 2014 17:05:09 -0800 Subject: Header --- sites/docs/api/config.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sites/docs/api') diff --git a/sites/docs/api/config.rst b/sites/docs/api/config.rst index dc030b48..0a9fa1dc 100644 --- a/sites/docs/api/config.rst +++ b/sites/docs/api/config.rst @@ -1,4 +1,4 @@ -paramiko.config module +Configuration handling ====================== .. automodule:: paramiko.config -- cgit v1.2.3 From 960b3c038da0b41d956a1e31a18827533b153ed8 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 14 Feb 2014 17:08:30 -0800 Subject: More undocumented/internal modules --- sites/docs/api/kex_gex.rst | 4 ---- sites/docs/api/kex_group1.rst | 4 ---- 2 files changed, 8 deletions(-) delete mode 100644 sites/docs/api/kex_gex.rst delete mode 100644 sites/docs/api/kex_group1.rst (limited to 'sites/docs/api') diff --git a/sites/docs/api/kex_gex.rst b/sites/docs/api/kex_gex.rst deleted file mode 100644 index 9b5ff543..00000000 --- a/sites/docs/api/kex_gex.rst +++ /dev/null @@ -1,4 +0,0 @@ -paramiko.kex_gex module -======================= - -.. automodule:: paramiko.kex_gex diff --git a/sites/docs/api/kex_group1.rst b/sites/docs/api/kex_group1.rst deleted file mode 100644 index 47089326..00000000 --- a/sites/docs/api/kex_group1.rst +++ /dev/null @@ -1,4 +0,0 @@ -paramiko.kex_group1 module -========================== - -.. automodule:: paramiko.kex_group1 -- cgit v1.2.3 From da6d00dcb7f20ed0c37dcb94add875bd3c1c40d7 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 14 Feb 2014 17:08:36 -0800 Subject: More headers --- sites/docs/api/file.rst | 4 ++-- sites/docs/api/hostkeys.rst | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'sites/docs/api') diff --git a/sites/docs/api/file.rst b/sites/docs/api/file.rst index d16c834f..199f3ecc 100644 --- a/sites/docs/api/file.rst +++ b/sites/docs/api/file.rst @@ -1,4 +1,4 @@ -paramiko.file module -==================== +Buffered files +============== .. automodule:: paramiko.file diff --git a/sites/docs/api/hostkeys.rst b/sites/docs/api/hostkeys.rst index 5379a369..b57a2c6c 100644 --- a/sites/docs/api/hostkeys.rst +++ b/sites/docs/api/hostkeys.rst @@ -1,4 +1,4 @@ -paramiko.hostkeys module -======================== +Host key / known_hosts handling +=============================== .. automodule:: paramiko.hostkeys -- cgit v1.2.3 From b9d25a30b6e1f2691c5e716694d26fcfd4798502 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 14 Feb 2014 17:08:59 -0800 Subject: LOL no --- sites/docs/api/logging22.rst | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 sites/docs/api/logging22.rst (limited to 'sites/docs/api') diff --git a/sites/docs/api/logging22.rst b/sites/docs/api/logging22.rst deleted file mode 100644 index fad43489..00000000 --- a/sites/docs/api/logging22.rst +++ /dev/null @@ -1,4 +0,0 @@ -paramiko.logging22 module -========================= - -.. automodule:: paramiko.logging22 -- cgit v1.2.3 From ac63ed58a14dacf508b00a1df787cb41ed8b65dc Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 14 Feb 2014 17:11:51 -0800 Subject: Missed one re: keys modules --- sites/docs/api/keys.rst | 1 + sites/docs/api/pkey.rst | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) delete mode 100644 sites/docs/api/pkey.rst (limited to 'sites/docs/api') diff --git a/sites/docs/api/keys.rst b/sites/docs/api/keys.rst index ca09a878..af7b58c4 100644 --- a/sites/docs/api/keys.rst +++ b/sites/docs/api/keys.rst @@ -1,5 +1,6 @@ Key handling ============ +.. automodule:: paramiko.pkey .. automodule:: paramiko.dsskey .. automodule:: paramiko.rsakey diff --git a/sites/docs/api/pkey.rst b/sites/docs/api/pkey.rst deleted file mode 100644 index 418736b7..00000000 --- a/sites/docs/api/pkey.rst +++ /dev/null @@ -1,4 +0,0 @@ -paramiko.pkey module -==================== - -.. automodule:: paramiko.pkey -- cgit v1.2.3 From 29433436657381058a7da13aa8dcad2e27634a52 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 14 Feb 2014 17:12:00 -0800 Subject: Yup. Headers. --- sites/docs/api/message.rst | 4 ++-- sites/docs/api/packet.rst | 4 ++-- sites/docs/api/pipe.rst | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'sites/docs/api') diff --git a/sites/docs/api/message.rst b/sites/docs/api/message.rst index e660ef89..986548b5 100644 --- a/sites/docs/api/message.rst +++ b/sites/docs/api/message.rst @@ -1,4 +1,4 @@ -paramiko.message module -======================= +Protocol messages +================= .. automodule:: paramiko.message diff --git a/sites/docs/api/packet.rst b/sites/docs/api/packet.rst index ab7c6b45..72ad5591 100644 --- a/sites/docs/api/packet.rst +++ b/sites/docs/api/packet.rst @@ -1,4 +1,4 @@ -paramiko.packet module -====================== +Packet handling +=============== .. automodule:: paramiko.packet diff --git a/sites/docs/api/pipe.rst b/sites/docs/api/pipe.rst index 220dbc87..e480446f 100644 --- a/sites/docs/api/pipe.rst +++ b/sites/docs/api/pipe.rst @@ -1,4 +1,4 @@ -paramiko.pipe module -==================== +Cross-platform pipe implementations +=================================== .. automodule:: paramiko.pipe -- cgit v1.2.3 From c8d97d78c44929be0bfd569425ff6027f225378b Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 14 Feb 2014 17:12:27 -0800 Subject: More internals --- sites/docs/api/primes.rst | 4 ---- sites/docs/api/resource.rst | 4 ---- 2 files changed, 8 deletions(-) delete mode 100644 sites/docs/api/primes.rst delete mode 100644 sites/docs/api/resource.rst (limited to 'sites/docs/api') diff --git a/sites/docs/api/primes.rst b/sites/docs/api/primes.rst deleted file mode 100644 index 4d7a1f58..00000000 --- a/sites/docs/api/primes.rst +++ /dev/null @@ -1,4 +0,0 @@ -paramiko.primes module -====================== - -.. automodule:: paramiko.primes diff --git a/sites/docs/api/resource.rst b/sites/docs/api/resource.rst deleted file mode 100644 index c4c548f4..00000000 --- a/sites/docs/api/resource.rst +++ /dev/null @@ -1,4 +0,0 @@ -paramiko.resource module -======================== - -.. automodule:: paramiko.resource -- cgit v1.2.3 From 09c0006a40598e224a3a925e894573d0d0cbb4c1 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 14 Feb 2014 17:17:10 -0800 Subject: Consolidate SFTP docs --- sites/docs/api/sftp.rst | 10 ++++++++-- sites/docs/api/sftp_attr.rst | 4 ---- sites/docs/api/sftp_client.rst | 4 ---- sites/docs/api/sftp_file.rst | 4 ---- sites/docs/api/sftp_handle.rst | 4 ---- sites/docs/api/sftp_server.rst | 4 ---- sites/docs/api/sftp_si.rst | 4 ---- 7 files changed, 8 insertions(+), 26 deletions(-) delete mode 100644 sites/docs/api/sftp_attr.rst delete mode 100644 sites/docs/api/sftp_client.rst delete mode 100644 sites/docs/api/sftp_file.rst delete mode 100644 sites/docs/api/sftp_handle.rst delete mode 100644 sites/docs/api/sftp_server.rst delete mode 100644 sites/docs/api/sftp_si.rst (limited to 'sites/docs/api') diff --git a/sites/docs/api/sftp.rst b/sites/docs/api/sftp.rst index 731c2521..2eedecf8 100644 --- a/sites/docs/api/sftp.rst +++ b/sites/docs/api/sftp.rst @@ -1,4 +1,10 @@ -paramiko.sftp module -==================== +SFTP +==== .. automodule:: paramiko.sftp +.. automodule:: paramiko.sftp_attr +.. automodule:: paramiko.sftp_client +.. automodule:: paramiko.sftp_file +.. automodule:: paramiko.sftp_handle +.. automodule:: paramiko.sftp_server +.. automodule:: paramiko.sftp_si diff --git a/sites/docs/api/sftp_attr.rst b/sites/docs/api/sftp_attr.rst deleted file mode 100644 index 98bce03a..00000000 --- a/sites/docs/api/sftp_attr.rst +++ /dev/null @@ -1,4 +0,0 @@ -paramiko.sftp_attr module -========================= - -.. automodule:: paramiko.sftp_attr diff --git a/sites/docs/api/sftp_client.rst b/sites/docs/api/sftp_client.rst deleted file mode 100644 index 9892befe..00000000 --- a/sites/docs/api/sftp_client.rst +++ /dev/null @@ -1,4 +0,0 @@ -paramiko.sftp_client module -=========================== - -.. automodule:: paramiko.sftp_client diff --git a/sites/docs/api/sftp_file.rst b/sites/docs/api/sftp_file.rst deleted file mode 100644 index 7df6e12b..00000000 --- a/sites/docs/api/sftp_file.rst +++ /dev/null @@ -1,4 +0,0 @@ -paramiko.sftp_file module -========================= - -.. automodule:: paramiko.sftp_file diff --git a/sites/docs/api/sftp_handle.rst b/sites/docs/api/sftp_handle.rst deleted file mode 100644 index 1d1c30ed..00000000 --- a/sites/docs/api/sftp_handle.rst +++ /dev/null @@ -1,4 +0,0 @@ -paramiko.sftp_handle module -=========================== - -.. automodule:: paramiko.sftp_handle diff --git a/sites/docs/api/sftp_server.rst b/sites/docs/api/sftp_server.rst deleted file mode 100644 index 82a6976e..00000000 --- a/sites/docs/api/sftp_server.rst +++ /dev/null @@ -1,4 +0,0 @@ -paramiko.sftp_server module -=========================== - -.. automodule:: paramiko.sftp_server diff --git a/sites/docs/api/sftp_si.rst b/sites/docs/api/sftp_si.rst deleted file mode 100644 index d071e61a..00000000 --- a/sites/docs/api/sftp_si.rst +++ /dev/null @@ -1,4 +0,0 @@ -paramiko.sftp_si module -======================= - -.. automodule:: paramiko.sftp_si -- cgit v1.2.3 From a627ecfb1450150e79fd4443c44acdffec807efd Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 14 Feb 2014 17:17:15 -0800 Subject: Even more headers --- sites/docs/api/proxy.rst | 4 ++-- sites/docs/api/server.rst | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'sites/docs/api') diff --git a/sites/docs/api/proxy.rst b/sites/docs/api/proxy.rst index e3cf59ca..8f3e3a8b 100644 --- a/sites/docs/api/proxy.rst +++ b/sites/docs/api/proxy.rst @@ -1,4 +1,4 @@ -paramiko.proxy module -===================== +ProxyCommand support +==================== .. automodule:: paramiko.proxy diff --git a/sites/docs/api/server.rst b/sites/docs/api/server.rst index f59b1216..7519ae99 100644 --- a/sites/docs/api/server.rst +++ b/sites/docs/api/server.rst @@ -1,4 +1,4 @@ -paramiko.server module -====================== +Server implementation +===================== .. automodule:: paramiko.server -- cgit v1.2.3 From 6e4829c20fbd7cb25b5689571ad2f296aa9dd3fe Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 14 Feb 2014 17:18:06 -0800 Subject: More internals --- sites/docs/api/util.rst | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 sites/docs/api/util.rst (limited to 'sites/docs/api') diff --git a/sites/docs/api/util.rst b/sites/docs/api/util.rst deleted file mode 100644 index de383ae1..00000000 --- a/sites/docs/api/util.rst +++ /dev/null @@ -1,4 +0,0 @@ -paramiko.util module -==================== - -.. automodule:: paramiko.util -- cgit v1.2.3 From 22766e96a65106cf8a3107bf432c0b8eb40cb681 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 14 Feb 2014 17:18:36 -0800 Subject: Last of headers! --- sites/docs/api/ssh_exception.rst | 4 ++-- sites/docs/api/transport.rst | 2 +- sites/docs/api/win_pageant.rst | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'sites/docs/api') diff --git a/sites/docs/api/ssh_exception.rst b/sites/docs/api/ssh_exception.rst index 7faaf5f4..64872dc2 100644 --- a/sites/docs/api/ssh_exception.rst +++ b/sites/docs/api/ssh_exception.rst @@ -1,4 +1,4 @@ -paramiko.ssh_exception module -============================= +Exceptions +========== .. automodule:: paramiko.ssh_exception diff --git a/sites/docs/api/transport.rst b/sites/docs/api/transport.rst index 6f5b1cd9..f68b77dc 100644 --- a/sites/docs/api/transport.rst +++ b/sites/docs/api/transport.rst @@ -1,4 +1,4 @@ -paramiko.transport module +Transport (core protocol) ========================= .. automodule:: paramiko.transport diff --git a/sites/docs/api/win_pageant.rst b/sites/docs/api/win_pageant.rst index 9b488080..c48da5c6 100644 --- a/sites/docs/api/win_pageant.rst +++ b/sites/docs/api/win_pageant.rst @@ -1,4 +1,4 @@ -paramiko.win_pageant module -=========================== +WinPageant support +================== .. automodule:: paramiko.win_pageant -- cgit v1.2.3 From 0af6df924add72313594c12418d0a2cb45291e4a Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 14 Feb 2014 18:20:47 -0800 Subject: First stab at segmented TOCtrees. Makes sidebar TOC a little funny tho. --- sites/docs/api/transport.rst | 4 ++-- sites/docs/index.rst | 43 +++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 43 insertions(+), 4 deletions(-) (limited to 'sites/docs/api') diff --git a/sites/docs/api/transport.rst b/sites/docs/api/transport.rst index f68b77dc..1b54f04e 100644 --- a/sites/docs/api/transport.rst +++ b/sites/docs/api/transport.rst @@ -1,4 +1,4 @@ -Transport (core protocol) -========================= +Transport +========= .. automodule:: paramiko.transport diff --git a/sites/docs/index.rst b/sites/docs/index.rst index 89c75831..bca0e650 100644 --- a/sites/docs/index.rst +++ b/sites/docs/index.rst @@ -5,7 +5,46 @@ This site covers Paramiko's usage & API documentation. For basic info on what Paramiko is, including its public changelog & how the project is maintained, please see `the main website `_. + +API documentation +================= + +Core SSH protocol classes +------------------------- + +.. toctree:: + api/channel + api/client + api/message + api/packet + api/transport + + +Authentication & key handling +----------------------------- + .. toctree:: - :glob: + api/agent + api/hostkeys + api/keys + api/win_pageant - api/* + +Other primary functions +----------------------- + +.. toctree:: + api/config + api/proxy + api/server + api/sftp + + +Miscellany +---------- + +.. toctree:: + api/buffered_pipe + api/file + api/pipe + api/ssh_exception -- cgit v1.2.3 From 88140996a7a259e9e028b022c037223ee97c4c87 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 21 Feb 2014 09:58:19 -0800 Subject: Too much 'handling' --- sites/docs/api/config.rst | 4 ++-- sites/docs/api/hostkeys.rst | 4 ++-- sites/docs/index.rst | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'sites/docs/api') diff --git a/sites/docs/api/config.rst b/sites/docs/api/config.rst index 0a9fa1dc..6f9d3ce3 100644 --- a/sites/docs/api/config.rst +++ b/sites/docs/api/config.rst @@ -1,4 +1,4 @@ -Configuration handling -====================== +Configuration +============= .. automodule:: paramiko.config diff --git a/sites/docs/api/hostkeys.rst b/sites/docs/api/hostkeys.rst index b57a2c6c..0859fbed 100644 --- a/sites/docs/api/hostkeys.rst +++ b/sites/docs/api/hostkeys.rst @@ -1,4 +1,4 @@ -Host key / known_hosts handling -=============================== +Host keys / ``known_hosts`` files +================================= .. automodule:: paramiko.hostkeys diff --git a/sites/docs/index.rst b/sites/docs/index.rst index 5133c244..98f4069a 100644 --- a/sites/docs/index.rst +++ b/sites/docs/index.rst @@ -21,8 +21,8 @@ Core SSH protocol classes api/transport -Authentication & key handling ------------------------------ +Authentication & keys +--------------------- .. toctree:: api/agent -- cgit v1.2.3 From 635108aab2e1f71024f68bfc47659cfea89496ea Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 21 Feb 2014 10:05:40 -0800 Subject: Formatting --- sites/docs/api/proxy.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sites/docs/api') diff --git a/sites/docs/api/proxy.rst b/sites/docs/api/proxy.rst index 8f3e3a8b..489b14e7 100644 --- a/sites/docs/api/proxy.rst +++ b/sites/docs/api/proxy.rst @@ -1,4 +1,4 @@ -ProxyCommand support -==================== +``ProxyCommand`` support +======================== .. automodule:: paramiko.proxy -- cgit v1.2.3 From d4148ab6f30fbea9d42e6999fb793a557a4d0f92 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 21 Feb 2014 10:20:57 -0800 Subject: Tweak core-class doc titles --- sites/docs/api/channel.rst | 4 ++-- sites/docs/api/client.rst | 4 ++-- sites/docs/api/message.rst | 4 ++-- sites/docs/api/packet.rst | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'sites/docs/api') diff --git a/sites/docs/api/channel.rst b/sites/docs/api/channel.rst index 3edb8ac7..e71526f6 100644 --- a/sites/docs/api/channel.rst +++ b/sites/docs/api/channel.rst @@ -1,4 +1,4 @@ -Channels -======== +Channel +======= .. automodule:: paramiko.channel diff --git a/sites/docs/api/client.rst b/sites/docs/api/client.rst index a0784d09..1661f97d 100644 --- a/sites/docs/api/client.rst +++ b/sites/docs/api/client.rst @@ -1,4 +1,4 @@ -Clients -======= +Client +====== .. automodule:: paramiko.client diff --git a/sites/docs/api/message.rst b/sites/docs/api/message.rst index 986548b5..8d531e01 100644 --- a/sites/docs/api/message.rst +++ b/sites/docs/api/message.rst @@ -1,4 +1,4 @@ -Protocol messages -================= +Message +======= .. automodule:: paramiko.message diff --git a/sites/docs/api/packet.rst b/sites/docs/api/packet.rst index 72ad5591..4089203b 100644 --- a/sites/docs/api/packet.rst +++ b/sites/docs/api/packet.rst @@ -1,4 +1,4 @@ -Packet handling -=============== +Packetizer +========== .. automodule:: paramiko.packet -- cgit v1.2.3 From eb332c781bf26a96a472f970550938ccba118056 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 21 Feb 2014 10:21:19 -0800 Subject: Reorganize Client so API doc flows better --- paramiko/client.py | 115 +++++++++++++++++++++++----------------------- sites/docs/api/client.rst | 1 + 2 files changed, 58 insertions(+), 58 deletions(-) (limited to 'sites/docs/api') diff --git a/paramiko/client.py b/paramiko/client.py index 19a09c2d..c7f9cfc8 100644 --- a/paramiko/client.py +++ b/paramiko/client.py @@ -17,7 +17,7 @@ # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ -:class:`SSHClient`. +SSH client & key policies """ from binascii import hexlify @@ -38,63 +38,6 @@ from paramiko.transport import Transport from paramiko.util import retry_on_signal -class MissingHostKeyPolicy (object): - """ - Interface for defining the policy that :class:`SSHClient` should use when the - SSH server's hostname is not in either the system host keys or the - application's keys. Pre-made classes implement policies for automatically - adding the key to the application's :class:`HostKeys` object (:class:`AutoAddPolicy`), - and for automatically rejecting the key (:class:`RejectPolicy`). - - This function may be used to ask the user to verify the key, for example. - """ - - def missing_host_key(self, client, hostname, key): - """ - Called when an :class:`SSHClient` receives a server key for a server that - isn't in either the system or local :class:`HostKeys` object. To accept - the key, simply return. To reject, raised an exception (which will - be passed to the calling application). - """ - pass - - -class AutoAddPolicy (MissingHostKeyPolicy): - """ - Policy for automatically adding the hostname and new host key to the - local :class:`HostKeys` object, and saving it. This is used by :class:`SSHClient`. - """ - - def missing_host_key(self, client, hostname, key): - client._host_keys.add(hostname, key.get_name(), key) - if client._host_keys_filename is not None: - client.save_host_keys(client._host_keys_filename) - client._log(DEBUG, 'Adding %s host key for %s: %s' % - (key.get_name(), hostname, hexlify(key.get_fingerprint()))) - - -class RejectPolicy (MissingHostKeyPolicy): - """ - Policy for automatically rejecting the unknown hostname & key. This is - used by :class:`SSHClient`. - """ - - def missing_host_key(self, client, hostname, key): - client._log(DEBUG, 'Rejecting %s host key for %s: %s' % - (key.get_name(), hostname, hexlify(key.get_fingerprint()))) - raise SSHException('Server %r not found in known_hosts' % hostname) - - -class WarningPolicy (MissingHostKeyPolicy): - """ - Policy for logging a python-style warning for an unknown host key, but - accepting it. This is used by :class:`SSHClient`. - """ - def missing_host_key(self, client, hostname, key): - warnings.warn('Unknown %s host key for %s: %s' % - (key.get_name(), hostname, hexlify(key.get_fingerprint()))) - - class SSHClient (object): """ A high-level representation of a session with an SSH server. This class @@ -536,3 +479,59 @@ class SSHClient (object): def _log(self, level, msg): self._transport._log(level, msg) + +class MissingHostKeyPolicy (object): + """ + Interface for defining the policy that :class:`SSHClient` should use when the + SSH server's hostname is not in either the system host keys or the + application's keys. Pre-made classes implement policies for automatically + adding the key to the application's :class:`HostKeys` object (:class:`AutoAddPolicy`), + and for automatically rejecting the key (:class:`RejectPolicy`). + + This function may be used to ask the user to verify the key, for example. + """ + + def missing_host_key(self, client, hostname, key): + """ + Called when an :class:`SSHClient` receives a server key for a server that + isn't in either the system or local :class:`HostKeys` object. To accept + the key, simply return. To reject, raised an exception (which will + be passed to the calling application). + """ + pass + + +class AutoAddPolicy (MissingHostKeyPolicy): + """ + Policy for automatically adding the hostname and new host key to the + local :class:`HostKeys` object, and saving it. This is used by :class:`SSHClient`. + """ + + def missing_host_key(self, client, hostname, key): + client._host_keys.add(hostname, key.get_name(), key) + if client._host_keys_filename is not None: + client.save_host_keys(client._host_keys_filename) + client._log(DEBUG, 'Adding %s host key for %s: %s' % + (key.get_name(), hostname, hexlify(key.get_fingerprint()))) + + +class RejectPolicy (MissingHostKeyPolicy): + """ + Policy for automatically rejecting the unknown hostname & key. This is + used by :class:`SSHClient`. + """ + + def missing_host_key(self, client, hostname, key): + client._log(DEBUG, 'Rejecting %s host key for %s: %s' % + (key.get_name(), hostname, hexlify(key.get_fingerprint()))) + raise SSHException('Server %r not found in known_hosts' % hostname) + + +class WarningPolicy (MissingHostKeyPolicy): + """ + Policy for logging a python-style warning for an unknown host key, but + accepting it. This is used by :class:`SSHClient`. + """ + def missing_host_key(self, client, hostname, key): + warnings.warn('Unknown %s host key for %s: %s' % + (key.get_name(), hostname, hexlify(key.get_fingerprint()))) diff --git a/sites/docs/api/client.rst b/sites/docs/api/client.rst index 1661f97d..b201812f 100644 --- a/sites/docs/api/client.rst +++ b/sites/docs/api/client.rst @@ -2,3 +2,4 @@ Client ====== .. automodule:: paramiko.client + :member-order: bysource -- cgit v1.2.3 From f40bf59ff3d18e7a0d8cdf685df09efaeb3b126e Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 21 Feb 2014 10:25:56 -0800 Subject: Source ordering updates for Transport --- paramiko/transport.py | 246 +++++++++++++++++++++---------------------- sites/docs/api/transport.rst | 1 + 2 files changed, 124 insertions(+), 123 deletions(-) (limited to 'sites/docs/api') diff --git a/paramiko/transport.py b/paramiko/transport.py index 7cccd5ff..8be0ca37 100644 --- a/paramiko/transport.py +++ b/paramiko/transport.py @@ -17,7 +17,7 @@ # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ -:class:`Transport` handles the core SSH2 protocol. +Core protocol implementation """ import os @@ -66,128 +66,6 @@ import atexit atexit.register(_join_lingering_threads) -class SecurityOptions (object): - """ - Simple object containing the security preferences of an ssh transport. - These are tuples of acceptable ciphers, digests, key types, and key - exchange algorithms, listed in order of preference. - - Changing the contents and/or order of these fields affects the underlying - :class:`Transport` (but only if you change them before starting the session). - If you try to add an algorithm that paramiko doesn't recognize, - ``ValueError`` will be raised. If you try to assign something besides a - tuple to one of the fields, ``TypeError`` will be raised. - """ - __slots__ = [ 'ciphers', 'digests', 'key_types', 'kex', 'compression', '_transport' ] - - def __init__(self, transport): - self._transport = transport - - def __repr__(self): - """ - Returns a string representation of this object, for debugging. - - :rtype: str - """ - return '' % repr(self._transport) - - def _get_ciphers(self): - return self._transport._preferred_ciphers - - def _get_digests(self): - return self._transport._preferred_macs - - def _get_key_types(self): - return self._transport._preferred_keys - - def _get_kex(self): - return self._transport._preferred_kex - - def _get_compression(self): - return self._transport._preferred_compression - - def _set(self, name, orig, x): - if type(x) is list: - x = tuple(x) - if type(x) is not tuple: - raise TypeError('expected tuple or list') - possible = getattr(self._transport, orig).keys() - forbidden = filter(lambda n: n not in possible, x) - if len(forbidden) > 0: - raise ValueError('unknown cipher') - setattr(self._transport, name, x) - - def _set_ciphers(self, x): - self._set('_preferred_ciphers', '_cipher_info', x) - - def _set_digests(self, x): - self._set('_preferred_macs', '_mac_info', x) - - def _set_key_types(self, x): - self._set('_preferred_keys', '_key_info', x) - - def _set_kex(self, x): - self._set('_preferred_kex', '_kex_info', x) - - def _set_compression(self, x): - self._set('_preferred_compression', '_compression_info', x) - - ciphers = property(_get_ciphers, _set_ciphers, None, - "Symmetric encryption ciphers") - digests = property(_get_digests, _set_digests, None, - "Digest (one-way hash) algorithms") - key_types = property(_get_key_types, _set_key_types, None, - "Public-key algorithms") - kex = property(_get_kex, _set_kex, None, "Key exchange algorithms") - compression = property(_get_compression, _set_compression, None, - "Compression algorithms") - - -class ChannelMap (object): - def __init__(self): - # (id -> Channel) - self._map = weakref.WeakValueDictionary() - self._lock = threading.Lock() - - def put(self, chanid, chan): - self._lock.acquire() - try: - self._map[chanid] = chan - finally: - self._lock.release() - - def get(self, chanid): - self._lock.acquire() - try: - return self._map.get(chanid, None) - finally: - self._lock.release() - - def delete(self, chanid): - self._lock.acquire() - try: - try: - del self._map[chanid] - except KeyError: - pass - finally: - self._lock.release() - - def values(self): - self._lock.acquire() - try: - return self._map.values() - finally: - self._lock.release() - - def __len__(self): - self._lock.acquire() - try: - return len(self._map) - finally: - self._lock.release() - - class Transport (threading.Thread): """ An SSH Transport attaches to a stream (usually a socket), negotiates an @@ -2154,3 +2032,125 @@ class Transport (threading.Thread): MSG_CHANNEL_EOF: Channel._handle_eof, MSG_CHANNEL_CLOSE: Channel._handle_close, } + + +class SecurityOptions (object): + """ + Simple object containing the security preferences of an ssh transport. + These are tuples of acceptable ciphers, digests, key types, and key + exchange algorithms, listed in order of preference. + + Changing the contents and/or order of these fields affects the underlying + :class:`Transport` (but only if you change them before starting the session). + If you try to add an algorithm that paramiko doesn't recognize, + ``ValueError`` will be raised. If you try to assign something besides a + tuple to one of the fields, ``TypeError`` will be raised. + """ + __slots__ = [ 'ciphers', 'digests', 'key_types', 'kex', 'compression', '_transport' ] + + def __init__(self, transport): + self._transport = transport + + def __repr__(self): + """ + Returns a string representation of this object, for debugging. + + :rtype: str + """ + return '' % repr(self._transport) + + def _get_ciphers(self): + return self._transport._preferred_ciphers + + def _get_digests(self): + return self._transport._preferred_macs + + def _get_key_types(self): + return self._transport._preferred_keys + + def _get_kex(self): + return self._transport._preferred_kex + + def _get_compression(self): + return self._transport._preferred_compression + + def _set(self, name, orig, x): + if type(x) is list: + x = tuple(x) + if type(x) is not tuple: + raise TypeError('expected tuple or list') + possible = getattr(self._transport, orig).keys() + forbidden = filter(lambda n: n not in possible, x) + if len(forbidden) > 0: + raise ValueError('unknown cipher') + setattr(self._transport, name, x) + + def _set_ciphers(self, x): + self._set('_preferred_ciphers', '_cipher_info', x) + + def _set_digests(self, x): + self._set('_preferred_macs', '_mac_info', x) + + def _set_key_types(self, x): + self._set('_preferred_keys', '_key_info', x) + + def _set_kex(self, x): + self._set('_preferred_kex', '_kex_info', x) + + def _set_compression(self, x): + self._set('_preferred_compression', '_compression_info', x) + + ciphers = property(_get_ciphers, _set_ciphers, None, + "Symmetric encryption ciphers") + digests = property(_get_digests, _set_digests, None, + "Digest (one-way hash) algorithms") + key_types = property(_get_key_types, _set_key_types, None, + "Public-key algorithms") + kex = property(_get_kex, _set_kex, None, "Key exchange algorithms") + compression = property(_get_compression, _set_compression, None, + "Compression algorithms") + + +class ChannelMap (object): + def __init__(self): + # (id -> Channel) + self._map = weakref.WeakValueDictionary() + self._lock = threading.Lock() + + def put(self, chanid, chan): + self._lock.acquire() + try: + self._map[chanid] = chan + finally: + self._lock.release() + + def get(self, chanid): + self._lock.acquire() + try: + return self._map.get(chanid, None) + finally: + self._lock.release() + + def delete(self, chanid): + self._lock.acquire() + try: + try: + del self._map[chanid] + except KeyError: + pass + finally: + self._lock.release() + + def values(self): + self._lock.acquire() + try: + return self._map.values() + finally: + self._lock.release() + + def __len__(self): + self._lock.acquire() + try: + return len(self._map) + finally: + self._lock.release() diff --git a/sites/docs/api/transport.rst b/sites/docs/api/transport.rst index 1b54f04e..7c9d9fd1 100644 --- a/sites/docs/api/transport.rst +++ b/sites/docs/api/transport.rst @@ -2,3 +2,4 @@ Transport ========= .. automodule:: paramiko.transport + :member-order: bysource -- cgit v1.2.3 From 333dd249b01b059f8ecd887a515dd964bfbf7adb Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 21 Feb 2014 16:37:16 -0800 Subject: Start in on the SFTP section --- paramiko/sftp_attr.py | 4 ++-- paramiko/sftp_client.py | 18 +++++++++--------- sites/docs/api/sftp.rst | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) (limited to 'sites/docs/api') diff --git a/paramiko/sftp_attr.py b/paramiko/sftp_attr.py index 37cdeba7..b8040399 100644 --- a/paramiko/sftp_attr.py +++ b/paramiko/sftp_attr.py @@ -26,8 +26,8 @@ class SFTPAttributes (object): """ Representation of the attributes of a file (or proxied file) for SFTP in client or server mode. It attemps to mirror the object returned by - ``os.stat`` as closely as possible, so it may have the following fields, - with the same meanings as those returned by an ``os.stat`` object: + `os.stat` as closely as possible, so it may have the following fields, + with the same meanings as those returned by an `os.stat` object: - st_size - st_uid - st_gid diff --git a/paramiko/sftp_client.py b/paramiko/sftp_client.py index d1d62233..b9d8744d 100644 --- a/paramiko/sftp_client.py +++ b/paramiko/sftp_client.py @@ -16,9 +16,6 @@ # along with Paramiko; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. -""" -Client-mode SFTP support. -""" from binascii import hexlify import errno @@ -49,12 +46,13 @@ def _to_unicode(s): return s -class SFTPClient (BaseSFTP): +class SFTPClient(BaseSFTP): """ - SFTP client object. ``SFTPClient`` is used to open an sftp session across - an open ssh `.Transport` and do remote file operations. + SFTP client object. + + Used to open an SFTP session across an open SSH `.Transport` and perform + remote file operations. """ - def __init__(self, sock): """ Create an SFTP client from an existing `.Channel`. The channel @@ -782,6 +780,8 @@ class SFTPClient (BaseSFTP): return self._cwd + '/' + path -class SFTP (SFTPClient): - "an alias for `.SFTPClient` for backwards compatability" +class SFTP(SFTPClient): + """ + An alias for `.SFTPClient` for backwards compatability. + """ pass diff --git a/sites/docs/api/sftp.rst b/sites/docs/api/sftp.rst index 2eedecf8..c016d73e 100644 --- a/sites/docs/api/sftp.rst +++ b/sites/docs/api/sftp.rst @@ -2,9 +2,9 @@ SFTP ==== .. automodule:: paramiko.sftp -.. automodule:: paramiko.sftp_attr .. automodule:: paramiko.sftp_client +.. automodule:: paramiko.sftp_server +.. automodule:: paramiko.sftp_attr .. automodule:: paramiko.sftp_file .. automodule:: paramiko.sftp_handle -.. automodule:: paramiko.sftp_server .. automodule:: paramiko.sftp_si -- cgit v1.2.3 From 6d9b28c56c81c2d4eb7452f0d986e4e4ec6c3039 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 21 Feb 2014 16:56:13 -0800 Subject: Remove win_pageant from docs for now :( too many freakin errors --- sites/docs/api/win_pageant.rst | 4 ---- sites/docs/index.rst | 1 - 2 files changed, 5 deletions(-) delete mode 100644 sites/docs/api/win_pageant.rst (limited to 'sites/docs/api') diff --git a/sites/docs/api/win_pageant.rst b/sites/docs/api/win_pageant.rst deleted file mode 100644 index c48da5c6..00000000 --- a/sites/docs/api/win_pageant.rst +++ /dev/null @@ -1,4 +0,0 @@ -WinPageant support -================== - -.. automodule:: paramiko.win_pageant diff --git a/sites/docs/index.rst b/sites/docs/index.rst index 87a0f994..9e682bb0 100644 --- a/sites/docs/index.rst +++ b/sites/docs/index.rst @@ -50,7 +50,6 @@ Authentication & keys api/agent api/hostkeys api/keys - api/win_pageant Other primary functions -- cgit v1.2.3 From 9ae62eb47a4f7a20eae90a7296ce0a8ecb4923b9 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 21 Feb 2014 19:15:36 -0800 Subject: Wow there's a lot of SFTP crap. --- paramiko/sftp_attr.py | 19 ++++++++-------- paramiko/sftp_client.py | 58 +++++++++++++++++++++++++------------------------ paramiko/sftp_file.py | 50 +++++++++++++++++++++++------------------- paramiko/sftp_handle.py | 4 ++-- paramiko/sftp_server.py | 6 ++--- paramiko/sftp_si.py | 20 +++++++++-------- sites/docs/api/sftp.rst | 3 +++ 7 files changed, 87 insertions(+), 73 deletions(-) (limited to 'sites/docs/api') diff --git a/paramiko/sftp_attr.py b/paramiko/sftp_attr.py index b8040399..9b30829c 100644 --- a/paramiko/sftp_attr.py +++ b/paramiko/sftp_attr.py @@ -28,12 +28,13 @@ class SFTPAttributes (object): client or server mode. It attemps to mirror the object returned by `os.stat` as closely as possible, so it may have the following fields, with the same meanings as those returned by an `os.stat` object: - - st_size - - st_uid - - st_gid - - st_mode - - st_atime - - st_mtime + + - ``st_size`` + - ``st_uid`` + - ``st_gid`` + - ``st_mode`` + - ``st_atime`` + - ``st_mtime`` Because SFTP allows flags to have other arbitrary named attributes, these are stored in a dict named ``attr``. Occasionally, the filename is also @@ -61,10 +62,10 @@ class SFTPAttributes (object): def from_stat(cls, obj, filename=None): """ - Create an SFTPAttributes object from an existing ``stat`` object (an - object returned by ``os.stat``). + Create an `.SFTPAttributes` object from an existing ``stat`` object (an + object returned by `os.stat`). - :param obj: an object returned by ``os.stat`` (or equivalent). + :param obj: an object returned by `os.stat` (or equivalent). :type obj: object :param filename: the filename associated with this file. :type filename: str diff --git a/paramiko/sftp_client.py b/paramiko/sftp_client.py index b9d8744d..db8d196f 100644 --- a/paramiko/sftp_client.py +++ b/paramiko/sftp_client.py @@ -1,6 +1,6 @@ # Copyright (C) 2003-2007 Robey Pointer # -# This file is part of paramiko. +# This file is part of Paramiko. # # Paramiko is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free @@ -194,16 +194,17 @@ class SFTPClient(BaseSFTP): def open(self, filename, mode='r', bufsize=-1): """ Open a file on the remote server. The arguments are the same as for - Python's built-in ``file`` (aka ``open``). A file-like object is - returned, which closely mimics the behavior of a normal Python file - object, including the ability to be used as a context manager. + Python's built-in `python:file` (aka `python:open`). A file-like + object is returned, which closely mimics the behavior of a normal + Python file object, including the ability to be used as a context + manager. The mode indicates how the file is to be opened: ``'r'`` for reading, - ``'w'`` for writing (truncating an existing file), ``'a'`` for appending, - ``'r+'`` for reading/writing, ``'w+'`` for reading/writing (truncating an - existing file), ``'a+'`` for reading/appending. The Python ``'b'`` flag - is ignored, since SSH treats all files as binary. The ``'U'`` flag is - supported in a compatible way. + ``'w'`` for writing (truncating an existing file), ``'a'`` for + appending, ``'r+'`` for reading/writing, ``'w+'`` for reading/writing + (truncating an existing file), ``'a+'`` for reading/appending. The + Python ``'b'`` flag is ignored, since SSH treats all files as binary. + The ``'U'`` flag is supported in a compatible way. Since 1.5.2, an ``'x'`` flag indicates that the operation should only succeed if the file was created and did not previously exist. This has @@ -222,7 +223,7 @@ class SFTPClient(BaseSFTP): :param bufsize: desired buffering (-1 = default buffer size) :type bufsize: int :return: a file object representing the open file - :rtype: SFTPFile + :rtype: `.SFTPFile` :raises IOError: if the file could not be opened. """ @@ -319,16 +320,16 @@ class SFTPClient(BaseSFTP): contains fewer fields. An SFTP server may return as much or as little info as it wants, so the results may vary from server to server. - Unlike a Python ``stat`` object, the result may not be accessed as a - tuple. This is mostly due to the author's slack factor. + Unlike a Python `python:stat` object, the result may not be accessed as + a tuple. This is mostly due to the author's slack factor. - The fields supported are: ``st_mode``, ``st_size``, ``st_uid``, ``st_gid``, - ``st_atime``, and ``st_mtime``. + The fields supported are: ``st_mode``, ``st_size``, ``st_uid``, + ``st_gid``, ``st_atime``, and ``st_mtime``. :param path: the filename to stat :type path: str :return: an object containing attributes about the given file - :rtype: SFTPAttributes + :rtype: `.SFTPAttributes` """ path = self._adjust_cwd(path) self._log(DEBUG, 'stat(%r)' % path) @@ -346,7 +347,7 @@ class SFTPClient(BaseSFTP): :param path: the filename to stat :type path: str :return: an object containing attributes about the given file - :rtype: SFTPAttributes + :rtype: `.SFTPAttributes` """ path = self._adjust_cwd(path) self._log(DEBUG, 'lstat(%r)' % path) @@ -374,7 +375,7 @@ class SFTPClient(BaseSFTP): def chmod(self, path, mode): """ Change the mode (permissions) of a file. The permissions are - unix-style and identical to those used by Python's ``os.chmod`` + unix-style and identical to those used by Python's `os.chmod` function. :param path: path of the file to change the permissions of @@ -391,7 +392,7 @@ class SFTPClient(BaseSFTP): def chown(self, path, uid, gid): """ Change the owner (``uid``) and group (``gid``) of a file. As with - Python's ``os.chown`` function, you must pass both arguments, so if you + Python's `os.chown` function, you must pass both arguments, so if you only want to change one, use `stat` first to retrieve the current owner and group. @@ -433,9 +434,9 @@ class SFTPClient(BaseSFTP): def truncate(self, path, size): """ - Change the size of the file specified by ``path``. This usually extends - or shrinks the size of the file, just like the ``truncate()`` method on - Python file objects. + Change the size of the file specified by ``path``. This usually + extends or shrinks the size of the file, just like the `~file.truncate` + method on Python file objects. :param path: path of the file to modify :type path: str @@ -498,9 +499,9 @@ class SFTPClient(BaseSFTP): def chdir(self, path): """ Change the "current directory" of this SFTP session. Since SFTP - doesn't really have the concept of a current working directory, this - is emulated by paramiko. Once you use this method to set a working - directory, all operations on this SFTPClient object will be relative + doesn't really have the concept of a current working directory, this is + emulated by Paramiko. Once you use this method to set a working + directory, all operations on this `.SFTPClient` object will be relative to that path. You can pass in ``None`` to stop using a current working directory. @@ -521,7 +522,7 @@ class SFTPClient(BaseSFTP): def getcwd(self): """ Return the "current working directory" for this SFTP session, as - emulated by paramiko. If no directory has been set with `chdir`, + emulated by Paramiko. If no directory has been set with `chdir`, this method will return ``None``. :return: the current working directory on the server, or ``None`` @@ -534,7 +535,8 @@ class SFTPClient(BaseSFTP): def putfo(self, fl, remotepath, file_size=0, callback=None, confirm=True): """ Copy the contents of an open file object (``fl``) to the SFTP server as - ``remotepath``. Any exception raised by operations will be passed through. + ``remotepath``. Any exception raised by operations will be passed + through. The SFTP operations use pipelining for speed. @@ -555,7 +557,7 @@ class SFTPClient(BaseSFTP): :return: an object containing attributes about the given file (since 1.7.4) - :rtype: SFTPAttributes + :rtype: `.SFTPAttributes` .. versionadded:: 1.4 """ @@ -603,7 +605,7 @@ class SFTPClient(BaseSFTP): :return: an object containing attributes about the given file (since 1.7.4) - :rtype: SFTPAttributes + :rtype: `.SFTPAttributes` .. versionadded:: 1.4 """ diff --git a/paramiko/sftp_file.py b/paramiko/sftp_file.py index fa026ec5..068ca1a1 100644 --- a/paramiko/sftp_file.py +++ b/paramiko/sftp_file.py @@ -17,7 +17,7 @@ # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ -`.SFTPFile` +SFTP file object """ from __future__ import with_statement @@ -64,6 +64,9 @@ class SFTPFile (BufferedFile): self._close(async=True) def close(self): + """ + Close the file. + """ self._close(async=False) def _close(self, async=False): @@ -183,10 +186,11 @@ class SFTPFile (BufferedFile): Set a timeout on read/write operations on the underlying socket or ssh `.Channel`. - .. seealso:: `Channel.settimeout` :param timeout: seconds to wait for a pending read/write operation before raising ``socket.timeout``, or ``None`` for no timeout :type timeout: float + + .. seealso:: `.Channel.settimeout` """ self.sftp.sock.settimeout(timeout) @@ -195,8 +199,9 @@ class SFTPFile (BufferedFile): Returns the timeout in seconds (as a float) associated with the socket or ssh `.Channel` used for this file. - .. seealso:: `Channel.gettimeout` :rtype: float + + .. seealso:: `.Channel.gettimeout` """ return self.sftp.sock.gettimeout() @@ -205,10 +210,11 @@ class SFTPFile (BufferedFile): Set blocking or non-blocking mode on the underiying socket or ssh `.Channel`. - .. seealso:: `Channel.setblocking` - :param blocking: 0 to set non-blocking mode; non-0 to set blocking - mode. + :param blocking: + 0 to set non-blocking mode; non-0 to set blocking mode. :type blocking: int + + .. seealso:: `.Channel.setblocking` """ self.sftp.sock.setblocking(blocking) @@ -226,11 +232,11 @@ class SFTPFile (BufferedFile): def stat(self): """ Retrieve information about this file from the remote system. This is - exactly like `SFTP.stat`, except that it operates on an already-open - file. + exactly like `.SFTPClient.stat`, except that it operates on an + already-open file. :return: an object containing attributes about this file. - :rtype: SFTPAttributes + :rtype: `.SFTPAttributes` """ t, msg = self.sftp._request(CMD_FSTAT, self.handle) if t != CMD_ATTRS: @@ -240,7 +246,7 @@ class SFTPFile (BufferedFile): def chmod(self, mode): """ Change the mode (permissions) of this file. The permissions are - unix-style and identical to those used by Python's ``os.chmod`` + unix-style and identical to those used by Python's `os.chmod` function. :param mode: new permissions @@ -254,7 +260,7 @@ class SFTPFile (BufferedFile): def chown(self, uid, gid): """ Change the owner (``uid``) and group (``gid``) of this file. As with - Python's ``os.chown`` function, you must pass both arguments, so if you + Python's `os.chown` function, you must pass both arguments, so if you only want to change one, use `stat` first to retrieve the current owner and group. @@ -341,12 +347,12 @@ class SFTPFile (BufferedFile): concatenated together :rtype: str - .. note:: Many (most?) servers don't support this extension yet. - :raises IOError: if the server doesn't support the "check-file" extension, or possibly doesn't support the hash algorithm requested + .. note:: Many (most?) servers don't support this extension yet. + .. versionadded:: 1.4 """ t, msg = self.sftp._request(CMD_EXTENDED, 'check-file', self.handle, @@ -360,11 +366,11 @@ class SFTPFile (BufferedFile): """ Turn on/off the pipelining of write operations to this file. When pipelining is on, paramiko won't wait for the server response after - each write operation. Instead, they're collected as they come in. - At the first non-write operation (including `close`), all remaining + each write operation. Instead, they're collected as they come in. At + the first non-write operation (including `.close`), all remaining server responses are collected. This means that if there was an error - with one of your later writes, an exception might be thrown from - within `close` instead of `write`. + with one of your later writes, an exception might be thrown from within + `.close` instead of `.write`. By default, files are not pipelined. @@ -378,14 +384,14 @@ class SFTPFile (BufferedFile): def prefetch(self): """ - Pre-fetch the remaining contents of this file in anticipation of - future `read` calls. If reading the entire file, pre-fetching can + Pre-fetch the remaining contents of this file in anticipation of future + `.read` calls. If reading the entire file, pre-fetching can dramatically improve the download speed by avoiding roundtrip latency. The file's contents are incrementally buffered in a background thread. - The prefetched data is stored in a buffer until read via the `read` + The prefetched data is stored in a buffer until read via the `.read` method. Once data has been read, it's removed from the buffer. The - data may be read in a random order (using `seek`); chunks of the + data may be read in a random order (using `.seek`); chunks of the buffer that haven't been read will continue to be buffered. .. versionadded:: 1.5.1 @@ -404,7 +410,7 @@ class SFTPFile (BufferedFile): def readv(self, chunks): """ Read a set of blocks from the file by (offset, length). This is more - efficient than doing a series of `seek` and `read` calls, since the + efficient than doing a series of `.seek` and `.read` calls, since the prefetch machinery is used to retrieve all the requested blocks at once. diff --git a/paramiko/sftp_handle.py b/paramiko/sftp_handle.py index 7e1389a2..6965fd65 100644 --- a/paramiko/sftp_handle.py +++ b/paramiko/sftp_handle.py @@ -41,7 +41,7 @@ class SFTPHandle (object): SFTP. If ``flags`` is passed in, it's used to determine if the file is open in append mode. - :param flags: optional flags as passed to `SFTPServerInterface.open` + :param flags: optional flags as passed to `.SFTPServerInterface.open` :type flags: int """ self.__flags = flags @@ -149,7 +149,7 @@ class SFTPHandle (object): def stat(self): """ Return an `.SFTPAttributes` object referring to this open file, or an - error code. This is equivalent to `SFTPServerInterface.stat`, except + error code. This is equivalent to `.SFTPServerInterface.stat`, except it's called on an open file instead of a path. :return: an attributes object for the given file, or an SFTP error diff --git a/paramiko/sftp_server.py b/paramiko/sftp_server.py index c7e80c1c..9b7ed5ca 100644 --- a/paramiko/sftp_server.py +++ b/paramiko/sftp_server.py @@ -42,7 +42,7 @@ class SFTPServer (BaseSFTP, SubsystemHandler): """ Server-side SFTP subsystem support. Since this is a `.SubsystemHandler`, it can be (and is meant to be) set as the handler for ``"sftp"`` requests. - Use `Transport.set_subsystem_handler` to activate this class. + Use `.Transport.set_subsystem_handler` to activate this class. """ def __init__(self, channel, name, server, sftp_si=SFTPServerInterface, *largs, **kwargs): @@ -50,7 +50,7 @@ class SFTPServer (BaseSFTP, SubsystemHandler): The constructor for SFTPServer is meant to be called from within the `.Transport` as a subsystem handler. ``server`` and any additional parameters or keyword parameters are passed from the original call to - `Transport.set_subsystem_handler`. + `.Transport.set_subsystem_handler`. :param channel: channel passed from the `.Transport`. :type channel: `.Channel` @@ -128,7 +128,7 @@ class SFTPServer (BaseSFTP, SubsystemHandler): :param e: an errno code, as from ``OSError.errno``. :type e: int - :return: an SFTP error code like `.SFTP_NO_SUCH_FILE`. + :return: an SFTP error code like ``SFTP_NO_SUCH_FILE``. :rtype: int """ if e == errno.EACCES: diff --git a/paramiko/sftp_si.py b/paramiko/sftp_si.py index b2debd3d..ead483a0 100644 --- a/paramiko/sftp_si.py +++ b/paramiko/sftp_si.py @@ -17,7 +17,7 @@ # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ -`.SFTPServerInterface` is an interface to override for SFTP server support. +An interface to override for SFTP server support. """ import os @@ -64,7 +64,7 @@ class SFTPServerInterface (object): """ The SFTP server session has just ended, either cleanly or via an exception. This method is meant to be overridden to perform any - necessary cleanup before this ``SFTPServerInterface`` object is + necessary cleanup before this `.SFTPServerInterface` object is destroyed. """ pass @@ -105,7 +105,7 @@ class SFTPServerInterface (object): :param attr: requested attributes of the file if it is newly created. :type attr: `.SFTPAttributes` :return: a new `.SFTPHandle` or error code. - :rtype `.SFTPHandle` + :rtype: `.SFTPHandle` """ return SFTP_OP_UNSUPPORTED @@ -120,7 +120,7 @@ class SFTPServerInterface (object): ``os.stat``. In addition, each object should have its ``filename`` field filled in, since this is important to a directory listing and not normally present in ``os.stat`` results. The method - `SFTPAttributes.from_stat` will usually do what you want. + `.SFTPAttributes.from_stat` will usually do what you want. In case of an error, you should return one of the ``SFTP_*`` error codes, such as `.SFTP_PERMISSION_DENIED`. @@ -131,11 +131,13 @@ class SFTPServerInterface (object): `.SFTPAttributes` objects. :rtype: list of `.SFTPAttributes` or error code - .. note:: You should normalize the given ``path`` first (see the - ``os.path`` module) and check appropriate permissions before returning - the list of files. Be careful of malicious clients attempting to use - relative paths to escape restricted folders, if you're doing a direct - translation from the SFTP server path to your local filesystem. + .. note:: + You should normalize the given ``path`` first (see the `os.path` + module) and check appropriate permissions before returning the list + of files. Be careful of malicious clients attempting to use + relative paths to escape restricted folders, if you're doing a + direct translation from the SFTP server path to your local + filesystem. """ return SFTP_OP_UNSUPPORTED diff --git a/sites/docs/api/sftp.rst b/sites/docs/api/sftp.rst index c016d73e..956eada2 100644 --- a/sites/docs/api/sftp.rst +++ b/sites/docs/api/sftp.rst @@ -6,5 +6,8 @@ SFTP .. automodule:: paramiko.sftp_server .. automodule:: paramiko.sftp_attr .. automodule:: paramiko.sftp_file + :inherited-members: + :no-special-members: + :show-inheritance: .. automodule:: paramiko.sftp_handle .. automodule:: paramiko.sftp_si -- cgit v1.2.3 From c23579526b4a3c05e6d20bf92074ea0c8c37751d Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Mon, 24 Feb 2014 09:49:30 -0800 Subject: Tweak order of System doc page --- paramiko/server.py | 84 +++++++++++++++++++++++------------------------ sites/docs/api/server.rst | 1 + 2 files changed, 43 insertions(+), 42 deletions(-) (limited to 'sites/docs/api') diff --git a/paramiko/server.py b/paramiko/server.py index 9ff7243b..e7d37849 100644 --- a/paramiko/server.py +++ b/paramiko/server.py @@ -25,48 +25,6 @@ from paramiko.common import * from paramiko import util -class InteractiveQuery (object): - """ - A query (set of prompts) for a user during interactive authentication. - """ - - def __init__(self, name='', instructions='', *prompts): - """ - Create a new interactive query to send to the client. The name and - instructions are optional, but are generally displayed to the end - user. A list of prompts may be included, or they may be added via - the `add_prompt` method. - - :param name: name of this query - :type name: str - :param instructions: user instructions (usually short) about this query - :type instructions: str - :param prompts: one or more authentication prompts - :type prompts: str - """ - self.name = name - self.instructions = instructions - self.prompts = [] - for x in prompts: - if (type(x) is str) or (type(x) is unicode): - self.add_prompt(x) - else: - self.add_prompt(x[0], x[1]) - - def add_prompt(self, prompt, echo=True): - """ - Add a prompt to this query. The prompt should be a (reasonably short) - string. Multiple prompts can be added to the same query. - - :param prompt: the user prompt - :type prompt: str - :param echo: ``True`` (default) if the user's response should be echoed; - ``False`` if not (for a password or similar) - :type echo: bool - """ - self.prompts.append((prompt, echo)) - - class ServerInterface (object): """ This class defines an interface for controlling the behavior of paramiko @@ -551,6 +509,48 @@ class ServerInterface (object): return OPEN_FAILED_ADMINISTRATIVELY_PROHIBITED +class InteractiveQuery (object): + """ + A query (set of prompts) for a user during interactive authentication. + """ + + def __init__(self, name='', instructions='', *prompts): + """ + Create a new interactive query to send to the client. The name and + instructions are optional, but are generally displayed to the end + user. A list of prompts may be included, or they may be added via + the `add_prompt` method. + + :param name: name of this query + :type name: str + :param instructions: user instructions (usually short) about this query + :type instructions: str + :param prompts: one or more authentication prompts + :type prompts: str + """ + self.name = name + self.instructions = instructions + self.prompts = [] + for x in prompts: + if (type(x) is str) or (type(x) is unicode): + self.add_prompt(x) + else: + self.add_prompt(x[0], x[1]) + + def add_prompt(self, prompt, echo=True): + """ + Add a prompt to this query. The prompt should be a (reasonably short) + string. Multiple prompts can be added to the same query. + + :param prompt: the user prompt + :type prompt: str + :param echo: ``True`` (default) if the user's response should be echoed; + ``False`` if not (for a password or similar) + :type echo: bool + """ + self.prompts.append((prompt, echo)) + + class SubsystemHandler (threading.Thread): """ Handler for a subsytem in server mode. If you create a subclass of this diff --git a/sites/docs/api/server.rst b/sites/docs/api/server.rst index 7519ae99..ea854544 100644 --- a/sites/docs/api/server.rst +++ b/sites/docs/api/server.rst @@ -2,3 +2,4 @@ Server implementation ===================== .. automodule:: paramiko.server + :member-order: bysource -- cgit v1.2.3 From 24cc59b64d4325a42f8992c7c916ace18bbcf960 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Mon, 24 Feb 2014 10:01:03 -0800 Subject: Reorder config doc --- paramiko/config.py | 110 +++++++++++++++++++++++----------------------- sites/docs/api/config.rst | 1 + 2 files changed, 56 insertions(+), 55 deletions(-) (limited to 'sites/docs/api') diff --git a/paramiko/config.py b/paramiko/config.py index 6f3bbdfc..ea978017 100644 --- a/paramiko/config.py +++ b/paramiko/config.py @@ -18,7 +18,7 @@ # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ -`.SSHConfig`. +Configuration file (aka ``ssh_config``) support. """ import fnmatch @@ -30,60 +30,6 @@ SSH_PORT = 22 proxy_re = re.compile(r"^(proxycommand)\s*=*\s*(.*)", re.I) -class LazyFqdn(object): - """ - Returns the host's fqdn on request as string. - """ - - def __init__(self, config, host=None): - self.fqdn = None - self.config = config - self.host = host - - def __str__(self): - if self.fqdn is None: - # - # If the SSH config contains AddressFamily, use that when - # determining the local host's FQDN. Using socket.getfqdn() from - # the standard library is the most general solution, but can - # result in noticeable delays on some platforms when IPv6 is - # misconfigured or not available, as it calls getaddrinfo with no - # address family specified, so both IPv4 and IPv6 are checked. - # - - # Handle specific option - fqdn = None - address_family = self.config.get('addressfamily', 'any').lower() - if address_family != 'any': - try: - family = socket.AF_INET if address_family == 'inet' \ - else socket.AF_INET6 - results = socket.getaddrinfo( - self.host, - None, - family, - socket.SOCK_DGRAM, - socket.IPPROTO_IP, - socket.AI_CANONNAME - ) - for res in results: - af, socktype, proto, canonname, sa = res - if canonname and '.' in canonname: - fqdn = canonname - break - # giaerror -> socket.getaddrinfo() can't resolve self.host - # (which is from socket.gethostname()). Fall back to the - # getfqdn() call below. - except socket.gaierror: - pass - # Handle 'any' / unspecified - if fqdn is None: - fqdn = socket.getfqdn() - # Cache - self.fqdn = fqdn - return self.fqdn - - class SSHConfig (object): """ Representation of config information as stored in the format used by @@ -264,3 +210,57 @@ class SSHConfig (object): else: config[k] = config[k].replace(find, str(replace)) return config + + +class LazyFqdn(object): + """ + Returns the host's fqdn on request as string. + """ + + def __init__(self, config, host=None): + self.fqdn = None + self.config = config + self.host = host + + def __str__(self): + if self.fqdn is None: + # + # If the SSH config contains AddressFamily, use that when + # determining the local host's FQDN. Using socket.getfqdn() from + # the standard library is the most general solution, but can + # result in noticeable delays on some platforms when IPv6 is + # misconfigured or not available, as it calls getaddrinfo with no + # address family specified, so both IPv4 and IPv6 are checked. + # + + # Handle specific option + fqdn = None + address_family = self.config.get('addressfamily', 'any').lower() + if address_family != 'any': + try: + family = socket.AF_INET if address_family == 'inet' \ + else socket.AF_INET6 + results = socket.getaddrinfo( + self.host, + None, + family, + socket.SOCK_DGRAM, + socket.IPPROTO_IP, + socket.AI_CANONNAME + ) + for res in results: + af, socktype, proto, canonname, sa = res + if canonname and '.' in canonname: + fqdn = canonname + break + # giaerror -> socket.getaddrinfo() can't resolve self.host + # (which is from socket.gethostname()). Fall back to the + # getfqdn() call below. + except socket.gaierror: + pass + # Handle 'any' / unspecified + if fqdn is None: + fqdn = socket.getfqdn() + # Cache + self.fqdn = fqdn + return self.fqdn diff --git a/sites/docs/api/config.rst b/sites/docs/api/config.rst index 6f9d3ce3..afb004c9 100644 --- a/sites/docs/api/config.rst +++ b/sites/docs/api/config.rst @@ -2,3 +2,4 @@ Configuration ============= .. automodule:: paramiko.config + :member-order: bysource -- cgit v1.2.3 From 4bcac18d17b62d3553f4fd91c9e904c1d5808cfe Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Mon, 24 Feb 2014 10:08:46 -0800 Subject: Host key docs (order + tweaks) --- paramiko/hostkeys.py | 163 +++++++++++++++++++++----------------------- sites/docs/api/hostkeys.rst | 1 + 2 files changed, 80 insertions(+), 84 deletions(-) (limited to 'sites/docs/api') diff --git a/paramiko/hostkeys.py b/paramiko/hostkeys.py index 1eed350a..ceb9051f 100644 --- a/paramiko/hostkeys.py +++ b/paramiko/hostkeys.py @@ -16,9 +16,6 @@ # along with Paramiko; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. -""" -`.HostKeys` -""" import base64 import binascii @@ -31,95 +28,21 @@ from paramiko.rsakey import RSAKey from paramiko.util import get_logger, constant_time_bytes_eq -class InvalidHostKey(Exception): - - def __init__(self, line, exc): - self.line = line - self.exc = exc - self.args = (line, exc) - - -class HostKeyEntry: - """ - Representation of a line in an OpenSSH-style "known hosts" file. - """ - - def __init__(self, hostnames=None, key=None): - self.valid = (hostnames is not None) and (key is not None) - self.hostnames = hostnames - self.key = key - - def from_line(cls, line, lineno=None): - """ - Parses the given line of text to find the names for the host, - the type of key, and the key data. The line is expected to be in the - format used by the openssh known_hosts file. - - Lines are expected to not have leading or trailing whitespace. - We don't bother to check for comments or empty lines. All of - that should be taken care of before sending the line to us. - - :param line: a line from an OpenSSH known_hosts file - :type line: str - """ - log = get_logger('paramiko.hostkeys') - fields = line.split(' ') - if len(fields) < 3: - # Bad number of fields - log.info("Not enough fields found in known_hosts in line %s (%r)" % - (lineno, line)) - return None - fields = fields[:3] - - names, keytype, key = fields - names = names.split(',') - - # Decide what kind of key we're looking at and create an object - # to hold it accordingly. - try: - if keytype == 'ssh-rsa': - key = RSAKey(data=base64.decodestring(key)) - elif keytype == 'ssh-dss': - key = DSSKey(data=base64.decodestring(key)) - else: - log.info("Unable to handle key of type %s" % (keytype,)) - return None - except binascii.Error, e: - raise InvalidHostKey(line, e) - - return cls(names, key) - from_line = classmethod(from_line) - - def to_line(self): - """ - Returns a string in OpenSSH known_hosts file format, or None if - the object is not in a valid state. A trailing newline is - included. - """ - if self.valid: - return '%s %s %s\n' % (','.join(self.hostnames), self.key.get_name(), - self.key.get_base64()) - return None - - def __repr__(self): - return '' % (self.hostnames, self.key) - - class HostKeys (UserDict.DictMixin): """ - Representation of an openssh-style "known hosts" file. Host keys can be + Representation of an OpenSSH-style "known hosts" file. Host keys can be read from one or more files, and then individual hosts can be looked up to verify server keys during SSH negotiation. - A HostKeys object can be treated like a dict; any dict lookup is equivalent - to calling `lookup`. + A `.HostKeys` object can be treated like a dict; any dict lookup is + equivalent to calling `lookup`. .. versionadded:: 1.5.3 """ def __init__(self, filename=None): """ - Create a new HostKeys object, optionally loading keys from an openssh + Create a new HostKeys object, optionally loading keys from an OpenSSH style host-key file. :param filename: filename to load host keys from, or ``None`` @@ -150,7 +73,7 @@ class HostKeys (UserDict.DictMixin): def load(self, filename): """ - Read a file of known SSH host keys, in the format used by openssh. + Read a file of known SSH host keys, in the format used by OpenSSH. This type of file unfortunately doesn't exist on Windows, but on posix, it will usually be stored in ``os.path.expanduser("~/.ssh/known_hosts")``. @@ -181,7 +104,7 @@ class HostKeys (UserDict.DictMixin): def save(self, filename): """ - Save host keys into a file, in the format used by openssh. The order of + Save host keys into a file, in the format used by OpenSSH. The order of keys in the file will be preserved when possible (if these keys were loaded from a file originally). The single exception is that combined lines will be split into individual key lines, which is arguably a bug. @@ -314,7 +237,7 @@ class HostKeys (UserDict.DictMixin): def hash_host(hostname, salt=None): """ - Return a "hashed" form of the hostname, as used by openssh when storing + Return a "hashed" form of the hostname, as used by OpenSSH when storing hashed hostnames in the known_hosts file. :param hostname: the hostname to hash @@ -336,3 +259,75 @@ class HostKeys (UserDict.DictMixin): return hostkey.replace('\n', '') hash_host = staticmethod(hash_host) + +class InvalidHostKey(Exception): + def __init__(self, line, exc): + self.line = line + self.exc = exc + self.args = (line, exc) + + +class HostKeyEntry: + """ + Representation of a line in an OpenSSH-style "known hosts" file. + """ + + def __init__(self, hostnames=None, key=None): + self.valid = (hostnames is not None) and (key is not None) + self.hostnames = hostnames + self.key = key + + def from_line(cls, line, lineno=None): + """ + Parses the given line of text to find the names for the host, + the type of key, and the key data. The line is expected to be in the + format used by the OpenSSH known_hosts file. + + Lines are expected to not have leading or trailing whitespace. + We don't bother to check for comments or empty lines. All of + that should be taken care of before sending the line to us. + + :param line: a line from an OpenSSH known_hosts file + :type line: str + """ + log = get_logger('paramiko.hostkeys') + fields = line.split(' ') + if len(fields) < 3: + # Bad number of fields + log.info("Not enough fields found in known_hosts in line %s (%r)" % + (lineno, line)) + return None + fields = fields[:3] + + names, keytype, key = fields + names = names.split(',') + + # Decide what kind of key we're looking at and create an object + # to hold it accordingly. + try: + if keytype == 'ssh-rsa': + key = RSAKey(data=base64.decodestring(key)) + elif keytype == 'ssh-dss': + key = DSSKey(data=base64.decodestring(key)) + else: + log.info("Unable to handle key of type %s" % (keytype,)) + return None + except binascii.Error, e: + raise InvalidHostKey(line, e) + + return cls(names, key) + from_line = classmethod(from_line) + + def to_line(self): + """ + Returns a string in OpenSSH known_hosts file format, or None if + the object is not in a valid state. A trailing newline is + included. + """ + if self.valid: + return '%s %s %s\n' % (','.join(self.hostnames), self.key.get_name(), + self.key.get_base64()) + return None + + def __repr__(self): + return '' % (self.hostnames, self.key) diff --git a/sites/docs/api/hostkeys.rst b/sites/docs/api/hostkeys.rst index 0859fbed..770652fd 100644 --- a/sites/docs/api/hostkeys.rst +++ b/sites/docs/api/hostkeys.rst @@ -2,3 +2,4 @@ Host keys / ``known_hosts`` files ================================= .. automodule:: paramiko.hostkeys + :member-order: bysource -- cgit v1.2.3 From 9ae46dcbfaab42b450db410eecd8e7e94183f1b8 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Mon, 24 Feb 2014 17:00:53 -0800 Subject: Fix up AgentSSH vs Agent classes/docstrings, sigh --- paramiko/agent.py | 29 +++++++---------------------- sites/docs/api/agent.rst | 2 ++ 2 files changed, 9 insertions(+), 22 deletions(-) (limited to 'sites/docs/api') diff --git a/paramiko/agent.py b/paramiko/agent.py index f5b116ca..302d31ec 100644 --- a/paramiko/agent.py +++ b/paramiko/agent.py @@ -17,7 +17,7 @@ # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. """ -SSH Agent interface for Unix clients. +SSH Agent interface """ import os @@ -42,16 +42,6 @@ SSH2_AGENTC_REQUEST_IDENTITIES, SSH2_AGENT_IDENTITIES_ANSWER, \ class AgentSSH(object): - """ - Client interface for using private keys from an SSH agent running on the - local machine. If an SSH agent is running, this class can be used to - connect to it and retreive `.PKey` objects which can be used when - attempting to authenticate to remote SSH servers. - - Because the SSH agent protocol uses environment variables and unix-domain - sockets, this probably doesn't work on Windows. It does work on most - posix platforms though (Linux and MacOS X, for example). - """ def __init__(self): self._conn = None self._keys = () @@ -318,19 +308,14 @@ class Agent(AgentSSH): connect to it and retreive `.PKey` objects which can be used when attempting to authenticate to remote SSH servers. - Because the SSH agent protocol uses environment variables and unix-domain - sockets, this probably doesn't work on Windows. It does work on most - posix platforms though (Linux and MacOS X, for example). + Upon initialization, a session with the local machine's SSH agent is + opened, if one is running. If no agent is running, initialization will + succeed, but `get_keys` will return an empty tuple. + + :raises SSHException: + if an SSH agent is found, but speaks an incompatible protocol """ def __init__(self): - """ - Open a session with the local machine's SSH agent, if one is running. - If no agent is running, initialization will succeed, but `get_keys` - will return an empty tuple. - - :raises SSHException: if an SSH agent is found, but speaks an - incompatible protocol - """ AgentSSH.__init__(self) if ('SSH_AUTH_SOCK' in os.environ) and (sys.platform != 'win32'): diff --git a/sites/docs/api/agent.rst b/sites/docs/api/agent.rst index 789f7b1d..3b614a82 100644 --- a/sites/docs/api/agent.rst +++ b/sites/docs/api/agent.rst @@ -2,3 +2,5 @@ SSH Agents ========== .. automodule:: paramiko.agent + :inherited-members: + :no-special-members: -- cgit v1.2.3