Skip to content

Commit f3c2658

Browse files
authored
Merge pull request #2312 from gizmoguy/docs-update
Docs update
2 parents b9924c3 + 440bba9 commit f3c2658

File tree

4 files changed

+28
-22
lines changed

4 files changed

+28
-22
lines changed

docs/developer_guide.rst

+28-19
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,10 @@ Finally, click ``Ok`` again to get back to the main screen of PyCharm.
7676
Install requirements
7777
~~~~~~~~~~~~~~~~~~~~
7878

79-
Inside the PyCharm editor window we should now get a bar at the top of the
80-
window telling us of missing package requirements, click the
81-
``Install requirements`` option to install the dependencies for faucet.
79+
Inside the PyCharm editor window if we open one of the code files for faucet
80+
(e.g. faucet/faucet.py) we should now get a bar at the top of the window
81+
telling us of missing package requirements, click the ``Install requirements``
82+
option to install the dependencies for faucet.
8283

8384
Create log and configuration directories
8485
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -99,26 +100,29 @@ Copy the sample gauge configuration file from
99100
``/Dev/faucet/etc/faucet/gauge.yaml`` to ``/Dev/faucet/venv/etc/faucet/`` and
100101
edit this configuration file as necessary.
101102

102-
Configure PyCharm to run faucet
103-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
103+
Configure PyCharm to run faucet and gauge
104+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
104105

105106
Now we need to configure PyCharm to run faucet, gauge and the unit tests.
106107

107108
First, click the ``Run -> Run..`` menu, then select the
108109
``Edit Configurations...`` option to get to the build settings dialog.
109110

110-
We will edit the default ``faucet`` run configuration that has been created
111-
for us. First change the ``Script path`` to point to ryu-manager inside the
112-
virtualenv, for me this was ``../venv/bin/ryu-manager``. Then set the
113-
``Parameters`` to ``faucet.faucet``. Make sure the working directory is
114-
set to ``/Dev/faucet/faucet/``.
111+
We will now add run configuration for starting ``faucet`` and ``gauge``.
112+
Click the ``+`` button in the top left hand corner of the window. First, change
113+
the name from ``Unnamed`` to ``faucet``. Change the ``Script path`` to point to
114+
ryu-manager inside the virtualenv, for me this was ``../venv/bin/ryu-manager``.
115+
Then set the ``Parameters`` to ``faucet.faucet``. Make sure the working
116+
directory is set to ``/Dev/faucet/faucet/``.
115117

116-
We will also add a ``gauge`` run configuration for starting gauge.
117-
First change the ``Script path`` to point to ryu-manager inside the
118-
virtualenv, for me this was ``../venv/bin/ryu-manager``. Then set the
119-
``Parameters`` to ``faucet.gauge``. Make sure the working directory is
118+
We will use the same steps as above to add a run configuration for ``gauge``.
119+
Changing the ``Script path`` to ``../venv/bin/ryu-manager`` and setting the
120+
``Parameters`` this time to ``faucet.gauge``. Make sure the working directory is
120121
set to ``/Dev/faucet/faucet/``.
121122

123+
Configure PyCharm to run unit tests
124+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
125+
122126
For running tests we need a few additional dependencies installed, I
123127
couldn't work out how to do this through PyCharm so run this command from a
124128
terminal window to install the correct dependencies inside the virtualenv:
@@ -127,11 +131,16 @@ terminal window to install the correct dependencies inside the virtualenv:
127131
128132
/Dev/faucet/venv/bin/pip3 install -r /Dev/faucet/test-requirements.txt
129133
130-
Click the green plus icon to add a new build configuration, select
131-
``Python tests -> Unittests``. You can provide a ``Name`` of
132-
``Faucet Unit Tests`` for the run configuration. For ``Target`` select
133-
``Script path`` and enter the path ``/Dev/faucet/tests/unit``. For ``Pattern``
134-
enter ``test_*.py``.
134+
To add the test run configuration we will again click the ``+`` button in the
135+
top left hand corner, select ``Python tests -> Unittests``.
136+
You can provide a ``Name`` of ``Faucet Unit Tests`` for the run configuration.
137+
For ``Target`` select ``Script path`` and enter the path
138+
``/Dev/faucet/tests/unit/faucet``. For ``Pattern`` enter ``test_*.py``.
139+
140+
We will also add test run configuration for gauge using the same steps as above.
141+
Use ``Gauge Unit Tests`` as the ``Name`` and for ``Target`` select
142+
``Script path`` and enter the path ``/Dev/faucet/tests/unit/gauge``.
143+
For ``Pattern`` enter ``test_*.py``.
135144

136145
You can click ``Apply`` and ``Close`` now that we've added all our new
137146
run configuration.

etc/faucet/faucet.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ dps:
2626
sw1:
2727
dp_id: 0x1
2828
hardware: "Open vSwitch"
29-
proactive_learn: True
3029
interfaces:
3130
1:
3231
name: "h1"

tests/fuzzer/config/ex10

-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ dps:
2323
sw1:
2424
dp_id: 0x1
2525
hardware: "Open vSwitch"
26-
proactive_learn: True
2726
interfaces:
2827
1:
2928
name: "h1"

tests/fuzzer/config/ex11

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ dps:
88
sw1:
99
dp_id: 0x1
1010
hardware: "Open vSwitch"
11-
proactive_learn: True
1211
interfaces:
1312
1:
1413
name: "h1"

0 commit comments

Comments
 (0)