@@ -23,9 +23,7 @@ const inspectExample = `- $ docker app inspect my-running-app
23
23
type inspectOptions struct {
24
24
credentialOptions
25
25
cliopts.InstallerContextOptions
26
- pretty bool
27
- orchestrator string
28
- kubeNamespace string
26
+ pretty bool
29
27
}
30
28
31
29
func inspectCmd (dockerCli command.Cli ) * cobra.Command {
@@ -40,19 +38,12 @@ func inspectCmd(dockerCli command.Cli) *cobra.Command {
40
38
},
41
39
}
42
40
cmd .Flags ().BoolVar (& opts .pretty , "pretty" , false , "Pretty print the output" )
43
- cmd .Flags ().StringVar (& opts .orchestrator , "orchestrator" , "" , "Orchestrator where the App is running on (swarm, kubernetes)" )
44
- cmd .Flags ().StringVar (& opts .kubeNamespace , "namespace" , "default" , "Kubernetes namespace in which to find the App" )
45
41
opts .credentialOptions .addFlags (cmd .Flags ())
46
42
opts .InstallerContextOptions .AddFlags (cmd .Flags ())
47
43
return cmd
48
44
}
49
45
50
46
func runInspect (dockerCli command.Cli , appName string , inspectOptions inspectOptions ) error {
51
- orchestrator , err := getContextOrchestrator (dockerCli , inspectOptions .orchestrator )
52
- if err != nil {
53
- return err
54
- }
55
-
56
47
defer muteDockerCli (dockerCli )()
57
48
_ , installationStore , credentialStore , err := prepareStores (dockerCli .CurrentContext ())
58
49
if err != nil {
@@ -63,11 +54,6 @@ func runInspect(dockerCli command.Cli, appName string, inspectOptions inspectOpt
63
54
return err
64
55
}
65
56
66
- orchestratorName , ok := installation .Parameters [internal .ParameterOrchestratorName ].(string )
67
- if ! ok || orchestratorName == "" {
68
- orchestratorName = string (orchestrator )
69
- }
70
-
71
57
creds , err := prepareCredentialSet (installation .Bundle , inspectOptions .CredentialSetOpts (dockerCli , credentialStore )... )
72
58
if err != nil {
73
59
return err
@@ -94,7 +80,7 @@ func runInspect(dockerCli command.Cli, appName string, inspectOptions inspectOpt
94
80
}
95
81
96
82
if inspectOptions .pretty {
97
- if err := inspect .Inspect (os .Stdout , installation , "pretty" , orchestratorName ); err != nil {
83
+ if err := inspect .Inspect (os .Stdout , installation , "pretty" ); err != nil {
98
84
return err
99
85
}
100
86
fmt .Fprint (os .Stdout , buf .String ())
@@ -107,7 +93,7 @@ func runInspect(dockerCli command.Cli, appName string, inspectOptions inspectOpt
107
93
AppInfo inspect.AppInfo `json:",omitempty"`
108
94
Services interface {} `json:",omitempty"`
109
95
}{
110
- inspect .GetAppInfo (installation , orchestratorName ),
96
+ inspect .GetAppInfo (installation ),
111
97
statusJSON ,
112
98
}, "" , " " )
113
99
if err != nil {
@@ -118,19 +104,6 @@ func runInspect(dockerCli command.Cli, appName string, inspectOptions inspectOpt
118
104
return nil
119
105
}
120
106
121
- func getContextOrchestrator (dockerCli command.Cli , orchestratorFlag string ) (command.Orchestrator , error ) {
122
- var orchestrator command.Orchestrator
123
- orchestrator , _ = command .NormalizeOrchestrator (orchestratorFlag )
124
- if string (orchestrator ) == "" {
125
- orchestrator , err := dockerCli .StackOrchestrator ("" )
126
- if err != nil {
127
- return "" , err
128
- }
129
- return orchestrator , nil
130
- }
131
- return orchestrator , nil
132
- }
133
-
134
107
func hasAction (bndl * bundle.Bundle , actionName string ) bool {
135
108
for key := range bndl .Actions {
136
109
if key == actionName {
0 commit comments