Revision eb4ed8c6

b/docs/Makefile
4 4
# You can set these variables from the command line.
5 5
SPHINXOPTS    =
6 6
SPHINXBUILD   = sphinx-build
7
EPYBUILD	  = epydoc
8
EPYCONFLOC	  = source
9
APIDIR		  = api
10

  
7 11
PAPER         =
8 12
BUILDDIR      = build
9 13

  
14

  
10 15
# Internal variables.
11 16
PAPEROPT_a4     = -D latex_paper_size=a4
12 17
PAPEROPT_letter = -D latex_paper_size=letter
......
16 21

  
17 22
help:
18 23
	@echo "Please use \`make <target>' where <target> is one of"
19
	@echo "  html      to make standalone HTML files"
20
	@echo "  dirhtml   to make HTML files named index.html in directories"
21
	@echo "  pickle    to make pickle files"
22
	@echo "  json      to make JSON files"
23
	@echo "  htmlhelp  to make HTML files and a HTML help project"
24
	@echo "  qthelp    to make HTML files and a qthelp project"
25
	@echo "  latex     to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
26
	@echo "  changes   to make an overview of all changed/added/deprecated items"
27
	@echo "  linkcheck to check all external links for integrity"
28
	@echo "  doctest   to run all doctests embedded in the documentation (if enabled)"
29

  
24
	@echo "  html      to make standalone sphinx HTML files"
25
	@echo "  api      to make standalone epydoc API files"
26
	
30 27
clean:
31 28
	-rm -rf $(BUILDDIR)/*
32 29

  
......
35 32
	@echo
36 33
	@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
37 34

  
38
dirhtml:
39
	$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
40
	@echo
41
	@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
42

  
43
pickle:
44
	$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
45
	@echo
46
	@echo "Build finished; now you can process the pickle files."
47

  
48
json:
49
	$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
50
	@echo
51
	@echo "Build finished; now you can process the JSON files."
52

  
53
htmlhelp:
54
	$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
55
	@echo
56
	@echo "Build finished; now you can run HTML Help Workshop with the" \
57
	      ".hhp project file in $(BUILDDIR)/htmlhelp."
58

  
59
qthelp:
60
	$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
61
	@echo
62
	@echo "Build finished; now you can run "qcollectiongenerator" with the" \
63
	      ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
64
	@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/ncclient.qhcp"
65
	@echo "To view the help file:"
66
	@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/ncclient.qhc"
67

  
68
latex:
69
	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
70
	@echo
71
	@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
72
	@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
73
	      "run these through (pdf)latex."
74

  
75
changes:
76
	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
35
api:
36
	@mkdir -p $(BUILDDIR)/$(APIDIR)
37
	$(EPYBUILD) -v -c $(EPYCONFLOC)/epydoc.conf --exclude migrations -o $(BUILDDIR)/$(APIDIR) iooclient
77 38
	@echo
78
	@echo "The overview file is in $(BUILDDIR)/changes."
39
	@echo "Build finished. The API pages are in $(BUILDDIR)/$(APIDIR)"
79 40

  
80
linkcheck:
81
	$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
82
	@echo
83
	@echo "Link check complete; look for any errors in the above output " \
84
	      "or in $(BUILDDIR)/linkcheck/output.txt."
85 41

  
86
doctest:
87
	$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
88
	@echo "Testing of doctests in the sources finished, look at the " \
89
	      "results in $(BUILDDIR)/doctest/output.txt."
b/docs/source/epydoc.conf
1
[epydoc]
2

  
3
name: iooclient
4
url: http://code.grnet.gr/projects/iooclient
5

  
6
output: html
7

  
8
# note: the wildcards means the directories should be cleaned up after each
9
# run, otherwise there will be stale '*c' (compiled) files that will not be
10
# parsable and will break the epydoc run
11
modules: iooclient
12

  
13
graph: all
14

  
15
simple-term: 1
16

  
17
docformat: epytext
18

  
19
imports: yes
20

  
21
include-log: no
22

  
23
inheritance: listed
24

  
25
parse: yes
26
introspect: no
27

  
28
fail-on: docstring_warnings
b/docs/source/handling.rst
42 42
The final step is to dictionarize this data structure.
43 43
Now the data is iterable and the values accessible via dictionary keys (example from :ref:`pmd-label`)::
44 44

  
45
    from iooclient import eos_pmd
45
    from iooclient.eos_pmd import *
46 46

  
47
    with eos_pmd('1.2.3.4', 20006, 'pass') as pmd:
47
    with eosPmd('1.2.3.4', 20006, 'pass') as pmd:
48 48
        pmd.list_pm_points()
49 49
    
50 50
    will give a list of dicts of lists of dicts...:
b/docs/source/index.rst
19 19

  
20 20
The best way to introduce is through a simple code example::
21 21

  
22
    from iooclient import eos_pmd
22
    from iooclient.eos_pmd import *
23 23

  
24
    with eos_pmd('1.2.3.4', 20006, 'pass') as pmd:
24
    with eosPmd('1.2.3.4', 20006, 'pass') as pmd:
25 25
        pmd.list_pm_points()
26 26

  
27 27
Output Handling
b/iooclient/eos_ned.py
46 46
        or structured python data
47 47
        
48 48
        Usage:
49

  
49
            
50
            >>> from iooclient.eos_ned import *
50 51
            >>> ned = eosNed('1.2.3.4', 20006, 'password')
51 52
            >>> ned.list_ne_dir()
52 53
            [{'{'userLabel': 'elementName',
......
54 55
              'notificationType': 'pmPointList',
55 56
              ...
56 57

  
57
        or
58
        
59
        >>> with eosNed('1.2.3.4', 20006, 'password') as ned:
60
        >>>    ned.list_ne_dir()
61
        [{'{'userLabel': 'elementName',
62
          'locationName': Athens,
63
          'notificationType': 'pmPointList',
64
          ... 
65
                
58
        or:
59
            
60
            >>> from iooclient.eos_ned import *
61
            >>> with eosNed('1.2.3.4', 20006, 'password') as ned:
62
            >>>    ned.list_ne_dir()
63
            [{'{'userLabel': 'elementName',
64
              'locationName': Athens,
65
              'notificationType': 'pmPointList',
66
              ... 
67
                    
66 68
        @rtype: String or list of dictionaries
67 69
        @return: Network element data in raw text format or in structured format. False in case of errors.
68 70
        '''
b/iooclient/eos_pmd.py
49 49
        
50 50
        Usage:
51 51
        
52
        >>> pmd = eosPmd('1.2.3.4', 20007, 'password')
53
        >>> pmd.list_pm_data()
54
        [{'{'friendlyName': 'elementName',
55
          'neLocationName': Athens,
56
          'notificationType': 'pmPointList',
57
          ...
52
            >>> from iooclient.eos_pmd import * 
53
            >>> pmd = eosPmd('1.2.3.4', 20007, 'password')
54
            >>> pmd.list_pm_data()
55
            [{'{'friendlyName': 'elementName',
56
              'neLocationName': Athens,
57
              'notificationType': 'pmPointList',
58
              ...
58 59
        
59
        or
60
        or:
60 61
        
61
        >>> with eosPmd('1.2.3.4', 20007, 'password') as pmd:
62
        >>>    pmd.list_pm_data()
63
        [{'{'friendlyName': 'elementName',
64
          'neLocationName': Athens,
65
          'notificationType': 'pmPointList',
66
          ... 
62
            >>> from iooclient.eos_pmd import * 
63
            >>> with eosPmd('1.2.3.4', 20007, 'password') as pmd:
64
            >>>    pmd.list_pm_data()
65
            [{'{'friendlyName': 'elementName',
66
              'neLocationName': Athens,
67
              'notificationType': 'pmPointList',
68
              ... 
67 69
        
68 70
        @type startPeriod: String
69 71
        @param startPeriod: From when to collect PM data. Format: YYYYMMDDQH where QH in [00,96] representing 15min periods in a day.
......
120 122
        or structured python data 
121 123
        
122 124
        Usage:
123
        
124
        >>> pmd = eosPmd('1.2.3.4', 20007, 'password')
125
        >>> pmd.list_pm_point()
126
        [{'{'friendlyName': 'elementName',
127
          'neLocationName': Athens,
128
          'notificationType': 'pmPointList',
129
          ...
130
        
131
        or
132
        
133
        >>> with eosPmd('1.2.3.4', 20007, 'password') as pmd:
134
        >>>    pmd.list_pm_point()
135
        [{'{'friendlyName': 'elementName',
136
          'neLocationName': Athens,
137
          'notificationType': 'pmPointList',
138
          ...
125
            
126
            >>> from iooclient.eos_pmd import * 
127
            >>> pmd = eosPmd('1.2.3.4', 20007, 'password')
128
            >>> pmd.list_pm_point()
129
            [{'{'friendlyName': 'elementName',
130
              'neLocationName': Athens,
131
              'notificationType': 'pmPointList',
132
              ...
133
            
134
        or:
135
            
136
            >>> from iooclient.eos_pmd import * 
137
            >>> with eosPmd('1.2.3.4', 20007, 'password') as pmd:
138
            >>>    pmd.list_pm_point()
139
            [{'{'friendlyName': 'elementName',
140
              'neLocationName': Athens,
141
              'notificationType': 'pmPointList',
142
            ...
139 143
        
140 144
        @type neNames: A list of strings
141 145
        @param neNames: A list of NetworkElement names with pmPoints assigned. If omitted, all NEs are assumed

Also available in: Unified diff