Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

ceph.in: clean up and enable --foo=bar style arguments #24333

Merged
merged 14 commits into from
Nov 8, 2018

Commits on Nov 2, 2018

  1. mon: fix help string for osd crush rule create-replicated

    Signed-off-by: John Spray <john.spray@redhat.com>
    John Spray committed Nov 2, 2018
    Configuration menu
    Copy the full SHA
    f82372f View commit details
    Browse the repository at this point in the history
  2. common: remove unused 'avail' field from commands

    This was introduced for the now-removed ceph-rest-api
    gateway.  It enabled limiting certain commands
    to be CLI-only or rest-only, but in practice almost
    everything just said "cli,rest" here.
    
    Now that ceph-rest-api is gone, let's remove this
    field.
    
    The CLI client code already tolerated the absence
    of this field, so older CLI clients will not mind.
    
    Signed-off-by: John Spray <john.spray@redhat.com>
    John Spray committed Nov 2, 2018
    Configuration menu
    Copy the full SHA
    7734e9f View commit details
    Browse the repository at this point in the history
  3. ceph.in: misc cleanups

    Get this pyflakes-clean ahead of making
    changes for keyword arguments.
    
    Signed-off-by: John Spray <john.spray@redhat.com>
    John Spray committed Nov 2, 2018
    Configuration menu
    Copy the full SHA
    917fc3d View commit details
    Browse the repository at this point in the history
  4. ceph.in: some cleanups

    Add some docstrings to functions, remove some
    dead code and places where e.g. dicts were used
    unncessary.
    
    Signed-off-by: John Spray <john.spray@redhat.com>
    John Spray committed Nov 2, 2018
    Configuration menu
    Copy the full SHA
    bd548c0 View commit details
    Browse the repository at this point in the history
  5. pybind: enable --keyword=arguments in ceph_argparse

    This is a simple implementation that treats anything
    that matches the "--X=Y" pattern as separate from
    positional arguments.
    
    This works well for optional arguments.  Mandatory
    arguments still need to be specified positionally,
    or the parsing code will think the command's
    argument description has not been satisfied.
    
    Signed-off-by: John Spray <john.spray@redhat.com>
    John Spray committed Nov 2, 2018
    Configuration menu
    Copy the full SHA
    e8775e8 View commit details
    Browse the repository at this point in the history
  6. mon: remove dead "cluster_snap" command

    This had existed in a disabled state (by having an empty
    string for the cli/rest field in the command definition)
    for a long time.  Now that that field is gone, we don't
    have a concept of "disabled" commands any more, so
    let's just clean up this loose end.
    
    Signed-off-by: John Spray <john.spray@redhat.com>
    John Spray committed Nov 2, 2018
    Configuration menu
    Copy the full SHA
    cc7a12f View commit details
    Browse the repository at this point in the history
  7. test: add cases for CLI's --key=val style

    Signed-off-by: John Spray <john.spray@redhat.com>
    John Spray committed Nov 2, 2018
    Configuration menu
    Copy the full SHA
    61d2ad0 View commit details
    Browse the repository at this point in the history
  8. mgr,mon: use CephChoices for confirmation flags

    ...so that arg parsing can rely on strings satisfying
    a "doesn't start with --" convention.
    
    Signed-off-by: John Spray <john.spray@redhat.com>
    John Spray committed Nov 2, 2018
    Configuration menu
    Copy the full SHA
    0da65ed View commit details
    Browse the repository at this point in the history
  9. test: remove quirky argparse case

    This relied on a behaviour where positional
    arguments could be omitted if the subsequent
    argument was of a different type.
    
    This was pretty weird, and in any case the reweight-by-utilization
    command is likely to go away soon.
    
    Signed-off-by: John Spray <john.spray@redhat.com>
    John Spray committed Nov 2, 2018
    Configuration menu
    Copy the full SHA
    6c1e4b8 View commit details
    Browse the repository at this point in the history
  10. ceph_argparse: introduce CephBool arguments

    This replaces use of CephChoices for cases like
    --yes-i-really-really-mean-it.
    
    It's a relatively invasive change, because both
    client and server need to handle backward compatibility:
     - Clients are easy, they just cope with the server's
       use of CephChoices/CephString with a few special case
       strings to recognise --yes-i-really-mean-it and similar
     - Servers are harder, they have to convert CephBool arguments
       into a similar CephChoices argument that older clients will
       understand.  This involves propagating feature flags into
       some code paths that couldn't see them before.
    
    Signed-off-by: John Spray <john.spray@redhat.com>
    John Spray committed Nov 2, 2018
    Configuration menu
    Copy the full SHA
    525623b View commit details
    Browse the repository at this point in the history
  11. mon: convert remaining confirmation flags to CephBool

    Signed-off-by: John Spray <john.spray@redhat.com>
    John Spray committed Nov 2, 2018
    Configuration menu
    Copy the full SHA
    98c2511 View commit details
    Browse the repository at this point in the history
  12. pybind: update python callers of force flags

    Signed-off-by: John Spray <john.spray@redhat.com>
    John Spray committed Nov 2, 2018
    Configuration menu
    Copy the full SHA
    a3e1a3e View commit details
    Browse the repository at this point in the history

Commits on Nov 7, 2018

  1. librados: update for CLI arg format change

    Signed-off-by: John Spray <john.spray@redhat.com>
    John Spray committed Nov 7, 2018
    Configuration menu
    Copy the full SHA
    e95eb0e View commit details
    Browse the repository at this point in the history
  2. test: update librados tests for CLI arg syntax

    Signed-off-by: John Spray <john.spray@redhat.com>
    John Spray committed Nov 7, 2018
    Configuration menu
    Copy the full SHA
    4df08eb View commit details
    Browse the repository at this point in the history