I completely disagree about the configuration being useless.
The configuration is hierarchical. Each item has its rightful place. Interfaces go in the interfaces stanza. Protocols go in the protocols stanza. So on and so forth. With IOS it's just a bunch of configuration commands with very little organization. Where do you configure OSPF? "router ospf" Where do you configure an OSPF interface type? On the actual interface. With Junos it's all under [protocols ospf].
The way you modify the configuration is through the CLI with commands such as set, delete, replace and rename. These commands aren't the configuration. They're editing commands.
If you really need to see the configuration commands that would have built the configuration, type
[edit]
# show | display set
If you need to import a segment of actual configuration, you can use the load command. For example if you wanted to import this firewall filter:
filter accept-bgp {
term accept-bgp {
from {
source-prefix-list {
bgp-neighbors;
bgp-neighbors-logical-systems;
}
destination-prefix-list {
router-ipv4;
router-ipv4-logical-systms;
}
protocol tcp;
port bgp;
}
then {
count accept-bgp;
accept;
}
}
}
You would simply copy it with CTRL-C, then go to your terminal and type the following command:
[edit]
# edit firewall
[edit firewall]
# load merge terminal relative
[Type ^D at a new line to end input]
Then just paste the config with CTRL-V, press enter, then press CTRL-D. Then type:
[edit firewall]
# show | compare
This will display the delta between the running configuration and the candiate configuration.