Skip to content

Commit 05eb192

Browse files
committed
Remove deprecated help topics and glossary bits
See https://bugs.launchpad.net/juju-core/+bug/1564017 for details.
1 parent 5c3b9bb commit 05eb192

File tree

18 files changed

+9
-1513
lines changed

18 files changed

+9
-1513
lines changed

FAQ.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ A: Read the docs. They're not complete (feel free to contribute), but
99
2. CONTRIBUTING
1010
3. doc/architectural-overview.txt
1111
4. doc/how-to-write-tests.txt
12-
5. doc/glossary.txt
13-
6. the other docs in doc/
12+
5. the other docs in doc/
1413

1514
Many of the docs in the doc/ directory become progressively more clear
1615
as you begin actually working in the code. Keep re-reading them

cmd/juju/commands/main.go

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import (
2121
"github.com/juju/juju/cmd/juju/cloud"
2222
"github.com/juju/juju/cmd/juju/controller"
2323
"github.com/juju/juju/cmd/juju/gui"
24-
"github.com/juju/juju/cmd/juju/helptopics"
2524
"github.com/juju/juju/cmd/juju/machine"
2625
"github.com/juju/juju/cmd/juju/metricsdebug"
2726
"github.com/juju/juju/cmd/juju/model"
@@ -84,34 +83,14 @@ func Main(args []string) {
8483
os.Exit(cmd.Main(jcmd, ctx, args[1:]))
8584
}
8685

86+
// NewJujuCommand ...
8787
func NewJujuCommand(ctx *cmd.Context) cmd.Command {
8888
jcmd := jujucmd.NewSuperCommand(cmd.SuperCommandParams{
8989
Name: "juju",
9090
Doc: jujuDoc,
9191
MissingCallback: RunPlugin,
9292
UserAliasesFilename: osenv.JujuXDGDataHomePath("aliases"),
9393
})
94-
jcmd.AddHelpTopic("basics", "Basic commands", helptopics.Basics)
95-
jcmd.AddHelpTopic("openstack-provider", "How to configure an OpenStack provider",
96-
helptopics.OpenstackProvider, "openstack")
97-
jcmd.AddHelpTopic("ec2-provider", "How to configure an Amazon EC2 provider",
98-
helptopics.EC2Provider, "ec2", "aws", "amazon")
99-
jcmd.AddHelpTopic("hpcloud-provider", "How to configure an HP Cloud provider",
100-
helptopics.HPCloud, "hpcloud", "hp-cloud")
101-
jcmd.AddHelpTopic("azure-provider", "How to configure a Windows Azure provider",
102-
helptopics.AzureProvider, "azure")
103-
jcmd.AddHelpTopic("maas-provider", "How to configure a MAAS provider",
104-
helptopics.MAASProvider, "maas")
105-
jcmd.AddHelpTopic("constraints", "How to use commands with constraints", helptopics.Constraints)
106-
jcmd.AddHelpTopic("placement", "How to use placement directives", helptopics.Placement)
107-
jcmd.AddHelpTopic("spaces", "How to configure more complex networks using spaces", helptopics.Spaces, "networking")
108-
jcmd.AddHelpTopic("glossary", "Glossary of terms", helptopics.Glossary)
109-
jcmd.AddHelpTopic("logging", "How Juju handles logging", helptopics.Logging)
110-
jcmd.AddHelpTopic("juju", "What is Juju?", helptopics.Juju)
111-
jcmd.AddHelpTopic("controllers", "About Juju Controllers", helptopics.JujuControllers)
112-
jcmd.AddHelpTopic("users", "About users in Juju", helptopics.Users)
113-
jcmd.AddHelpTopicCallback("plugins", "Show Juju plugins", PluginHelpTopic)
114-
11594
registerCommands(jcmd, ctx)
11695
return jcmd
11796
}

cmd/juju/commands/main_test.go

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import (
2222
gc "gopkg.in/check.v1"
2323

2424
"github.com/juju/juju/cmd/juju/block"
25-
"github.com/juju/juju/cmd/juju/helptopics"
2625
"github.com/juju/juju/cmd/juju/service"
2726
"github.com/juju/juju/cmd/modelcmd"
2827
cmdtesting "github.com/juju/juju/cmd/testing"
@@ -67,26 +66,6 @@ func (s *MainSuite) TestRunMain(c *gc.C) {
6766
code int
6867
out string
6968
}{{
70-
summary: "no params shows help",
71-
args: []string{},
72-
code: 0,
73-
out: strings.TrimLeft(helptopics.Basics, "\n"),
74-
}, {
75-
summary: "juju help is the same as juju",
76-
args: []string{"help"},
77-
code: 0,
78-
out: strings.TrimLeft(helptopics.Basics, "\n"),
79-
}, {
80-
summary: "juju --help works too",
81-
args: []string{"--help"},
82-
code: 0,
83-
out: strings.TrimLeft(helptopics.Basics, "\n"),
84-
}, {
85-
summary: "juju help basics is the same as juju",
86-
args: []string{"help", "basics"},
87-
code: 0,
88-
out: strings.TrimLeft(helptopics.Basics, "\n"),
89-
}, {
9069
summary: "juju help foo doesn't exist",
9170
args: []string{"help", "foo"},
9271
code: 1,
@@ -390,45 +369,6 @@ func setFeatureFlags(flags string) {
390369
featureflag.SetFlagsFromEnvironment(osenv.JujuFeatureFlagEnvKey)
391370
}
392371

393-
var topicNames = []string{
394-
"azure-provider",
395-
"basics",
396-
"commands",
397-
"constraints",
398-
"controllers",
399-
"ec2-provider",
400-
"global-options",
401-
"glossary",
402-
"hpcloud-provider",
403-
"juju",
404-
"logging",
405-
"maas-provider",
406-
"openstack-provider",
407-
"placement",
408-
"plugins",
409-
"spaces",
410-
"topics",
411-
"users",
412-
}
413-
414-
func (s *MainSuite) TestHelpTopics(c *gc.C) {
415-
// Check that we have correctly registered all the topics
416-
// by checking the help output.
417-
defer osenv.SetJujuXDGDataHome(osenv.SetJujuXDGDataHome(c.MkDir()))
418-
out := badrun(c, 0, "help", "topics")
419-
lines := strings.Split(out, "\n")
420-
var names []string
421-
for _, line := range lines {
422-
f := strings.Fields(line)
423-
if len(f) == 0 {
424-
continue
425-
}
426-
names = append(names, f[0])
427-
}
428-
// The names should be output in alphabetical order, so don't sort.
429-
c.Assert(names, gc.DeepEquals, topicNames)
430-
}
431-
432372
var globalFlags = []string{
433373
"--debug .*",
434374
"--description .*",

cmd/juju/commands/plugin_test.go

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -121,25 +121,6 @@ func (suite *PluginSuite) TestGatherDescriptionsInParallel(c *gc.C) {
121121
c.Assert(results[3].description, gc.Equals, "foo description")
122122
}
123123

124-
func (suite *PluginSuite) TestHelpPluginsWithNoPlugins(c *gc.C) {
125-
output := badrun(c, 0, "help", "plugins")
126-
c.Assert(output, jc.HasPrefix, PluginTopicText)
127-
c.Assert(output, jc.HasSuffix, "\n\nNo plugins found.\n")
128-
}
129-
130-
func (suite *PluginSuite) TestHelpPluginsWithPlugins(c *gc.C) {
131-
suite.makeFullPlugin(PluginParams{Name: "foo"})
132-
suite.makeFullPlugin(PluginParams{Name: "bar"})
133-
output := badrun(c, 0, "help", "plugins")
134-
c.Assert(output, jc.HasPrefix, PluginTopicText)
135-
expectedPlugins := `
136-
137-
bar bar description
138-
foo foo description
139-
`
140-
c.Assert(output, jc.HasSuffix, expectedPlugins)
141-
}
142-
143124
func (suite *PluginSuite) TestHelpPluginName(c *gc.C) {
144125
suite.makeFullPlugin(PluginParams{Name: "foo"})
145126
output := badrun(c, 0, "help", "foo")

cmd/juju/helptopics/basics.go

Lines changed: 0 additions & 32 deletions
This file was deleted.

cmd/juju/helptopics/constraints.go

Lines changed: 0 additions & 115 deletions
This file was deleted.

0 commit comments

Comments
 (0)