/mandos/release

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/release

« back to all changes in this revision

Viewing changes to mandos-ctl.xml

  • Committer: Teddy Hogeborn
  • Date: 2019-03-10 02:35:22 UTC
  • mto: This revision was merged to the branch mainline in revision 382.
  • Revision ID: teddy@recompile.se-20190310023522-cvos2tw2si6t7if3
mandos-ctl: Minimize number of D-Bus calls

* mandos-ctl (Command.run): Now takes a {objpath: properties} dict,
                            followed by optional "bus" and "mandos"
                            arguments.  Use "bus" to connect to
                            clients when dispatching to method
                            run_on_one_client().  All callers changed.
  (IsEnabledCmd.run): New.
  (IsEnabledCmd.run_on_one_client): Remove.
  (ApproveCmd.run_on_one_client): Add busname to debug output.
  (DenyCmd.run_on_one_client): - '' -
  (main): In D-Bus debug output, change "name" to "busname".  Also,
          don't connect to clients, just use the object path as the
          key of the "clients" dict passed to Command.run().
  (TestCmd.clients): Changed to an {objpath: properties} dict.
  (TestCmd.one_client): - '' -
  (TestCmd.bus): New mock bus object having a get_object() method.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3
3
        "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4
4
<!ENTITY COMMANDNAME "mandos-ctl">
5
 
<!ENTITY TIMESTAMP "2019-07-29">
 
5
<!ENTITY TIMESTAMP "2019-03-09">
6
6
<!ENTITY % common SYSTEM "common.ent">
7
7
%common;
8
8
]>
557
557
  
558
558
  <refsect1 id="example">
559
559
    <title>EXAMPLE</title>
560
 
    <!-- Name of test methods in class Test_commands_from_options are
561
 
         written in comments below.  When adding an example, add a
562
 
         test too which tests the documented behavior. -->
563
560
    <informalexample>
564
 
      <!-- Test method: test_manual_page_example_1() -->
565
561
      <para>
566
562
        To list all clients:
567
563
      </para>
571
567
    </informalexample>
572
568
    
573
569
    <informalexample>
574
 
      <!-- Test method: test_manual_page_example_2() -->
575
570
      <para>
576
571
        To list <emphasis>all</emphasis> settings for the clients
577
572
        named <quote>foo1.example.org</quote> and <quote
586
581
    </informalexample>
587
582
    
588
583
    <informalexample>
589
 
      <!-- Test method: test_manual_page_example_3() -->
590
584
      <para>
591
585
        To enable all clients:
592
586
      </para>
596
590
    </informalexample>
597
591
    
598
592
    <informalexample>
599
 
      <!-- Test method: test_manual_page_example_4() -->
600
593
      <para>
601
594
        To change timeout and interval value for the clients
602
595
        named <quote>foo1.example.org</quote> and <quote
605
598
      <para>
606
599
 
607
600
<!-- do not wrap this line -->
608
 
<userinput>&COMMANDNAME; --timeout=PT5M --interval=PT1M foo1.example.org foo2.example.org</userinput>
 
601
<userinput>&COMMANDNAME; --timeout="PT5M" --interval="PT1M" foo1.example.org foo2.example.org</userinput>
609
602
 
610
603
      </para>
611
604
    </informalexample>
612
605
    
613
606
    <informalexample>
614
 
      <!-- Test method: test_manual_page_example_5() -->
615
607
      <para>
616
 
        To approve all clients currently waiting for approval:
 
608
        To approve all clients currently waiting for it:
617
609
      </para>
618
610
      <para>
619
611
        <userinput>&COMMANDNAME; --approve --all</userinput>