docker_cli_plugins_test.go 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464
  1. package main
  2. import (
  3. "context"
  4. "fmt"
  5. "io/ioutil"
  6. "net/http"
  7. "os"
  8. "path"
  9. "path/filepath"
  10. "strings"
  11. "testing"
  12. "time"
  13. "github.com/docker/docker/api/types"
  14. "github.com/docker/docker/integration-cli/cli"
  15. "github.com/docker/docker/integration-cli/daemon"
  16. "github.com/docker/docker/testutil/fixtures/plugin"
  17. "gotest.tools/assert"
  18. )
  19. var (
  20. pluginProcessName = "sample-volume-plugin"
  21. pName = "tiborvass/sample-volume-plugin"
  22. npName = "tiborvass/test-docker-netplugin"
  23. pTag = "latest"
  24. pNameWithTag = pName + ":" + pTag
  25. npNameWithTag = npName + ":" + pTag
  26. )
  27. func (ps *DockerPluginSuite) TestPluginBasicOps(c *testing.T) {
  28. plugin := ps.getPluginRepoWithTag()
  29. _, _, err := dockerCmdWithError("plugin", "install", "--grant-all-permissions", plugin)
  30. assert.NilError(c, err)
  31. out, _, err := dockerCmdWithError("plugin", "ls")
  32. assert.NilError(c, err)
  33. assert.Assert(c, strings.Contains(out, plugin))
  34. assert.Assert(c, strings.Contains(out, "true"))
  35. id, _, err := dockerCmdWithError("plugin", "inspect", "-f", "{{.Id}}", plugin)
  36. id = strings.TrimSpace(id)
  37. assert.NilError(c, err)
  38. out, _, err = dockerCmdWithError("plugin", "remove", plugin)
  39. assert.ErrorContains(c, err, "")
  40. assert.Assert(c, strings.Contains(out, "is enabled"))
  41. _, _, err = dockerCmdWithError("plugin", "disable", plugin)
  42. assert.NilError(c, err)
  43. out, _, err = dockerCmdWithError("plugin", "remove", plugin)
  44. assert.NilError(c, err)
  45. assert.Assert(c, strings.Contains(out, plugin))
  46. _, err = os.Stat(filepath.Join(testEnv.DaemonInfo.DockerRootDir, "plugins", id))
  47. if !os.IsNotExist(err) {
  48. c.Fatal(err)
  49. }
  50. }
  51. func (ps *DockerPluginSuite) TestPluginForceRemove(c *testing.T) {
  52. pNameWithTag := ps.getPluginRepoWithTag()
  53. _, _, err := dockerCmdWithError("plugin", "install", "--grant-all-permissions", pNameWithTag)
  54. assert.NilError(c, err)
  55. out, _, _ := dockerCmdWithError("plugin", "remove", pNameWithTag)
  56. assert.Assert(c, strings.Contains(out, "is enabled"))
  57. out, _, err = dockerCmdWithError("plugin", "remove", "--force", pNameWithTag)
  58. assert.NilError(c, err)
  59. assert.Assert(c, strings.Contains(out, pNameWithTag))
  60. }
  61. func (s *DockerSuite) TestPluginActive(c *testing.T) {
  62. testRequires(c, DaemonIsLinux, IsAmd64, Network)
  63. _, _, err := dockerCmdWithError("plugin", "install", "--grant-all-permissions", pNameWithTag)
  64. assert.NilError(c, err)
  65. _, _, err = dockerCmdWithError("volume", "create", "-d", pNameWithTag, "--name", "testvol1")
  66. assert.NilError(c, err)
  67. out, _, _ := dockerCmdWithError("plugin", "disable", pNameWithTag)
  68. assert.Assert(c, strings.Contains(out, "in use"))
  69. _, _, err = dockerCmdWithError("volume", "rm", "testvol1")
  70. assert.NilError(c, err)
  71. _, _, err = dockerCmdWithError("plugin", "disable", pNameWithTag)
  72. assert.NilError(c, err)
  73. out, _, err = dockerCmdWithError("plugin", "remove", pNameWithTag)
  74. assert.NilError(c, err)
  75. assert.Assert(c, strings.Contains(out, pNameWithTag))
  76. }
  77. func (s *DockerSuite) TestPluginActiveNetwork(c *testing.T) {
  78. testRequires(c, DaemonIsLinux, IsAmd64, Network)
  79. _, _, err := dockerCmdWithError("plugin", "install", "--grant-all-permissions", npNameWithTag)
  80. assert.NilError(c, err)
  81. out, _, err := dockerCmdWithError("network", "create", "-d", npNameWithTag, "test")
  82. assert.NilError(c, err)
  83. nID := strings.TrimSpace(out)
  84. out, _, _ = dockerCmdWithError("plugin", "remove", npNameWithTag)
  85. assert.Assert(c, strings.Contains(out, "is in use"))
  86. _, _, err = dockerCmdWithError("network", "rm", nID)
  87. assert.NilError(c, err)
  88. out, _, _ = dockerCmdWithError("plugin", "remove", npNameWithTag)
  89. assert.Assert(c, strings.Contains(out, "is enabled"))
  90. _, _, err = dockerCmdWithError("plugin", "disable", npNameWithTag)
  91. assert.NilError(c, err)
  92. out, _, err = dockerCmdWithError("plugin", "remove", npNameWithTag)
  93. assert.NilError(c, err)
  94. assert.Assert(c, strings.Contains(out, npNameWithTag))
  95. }
  96. func (ps *DockerPluginSuite) TestPluginInstallDisable(c *testing.T) {
  97. pName := ps.getPluginRepoWithTag()
  98. out, _, err := dockerCmdWithError("plugin", "install", "--grant-all-permissions", "--disable", pName)
  99. assert.NilError(c, err)
  100. assert.Assert(c, strings.Contains(strings.TrimSpace(out), pName))
  101. out, _, err = dockerCmdWithError("plugin", "ls")
  102. assert.NilError(c, err)
  103. assert.Assert(c, strings.Contains(out, "false"))
  104. out, _, err = dockerCmdWithError("plugin", "enable", pName)
  105. assert.NilError(c, err)
  106. assert.Assert(c, strings.Contains(strings.TrimSpace(out), pName))
  107. out, _, err = dockerCmdWithError("plugin", "disable", pName)
  108. assert.NilError(c, err)
  109. assert.Assert(c, strings.Contains(strings.TrimSpace(out), pName))
  110. out, _, err = dockerCmdWithError("plugin", "remove", pName)
  111. assert.NilError(c, err)
  112. assert.Assert(c, strings.Contains(strings.TrimSpace(out), pName))
  113. }
  114. func (s *DockerSuite) TestPluginInstallDisableVolumeLs(c *testing.T) {
  115. testRequires(c, DaemonIsLinux, IsAmd64, Network)
  116. out, _, err := dockerCmdWithError("plugin", "install", "--grant-all-permissions", "--disable", pName)
  117. assert.NilError(c, err)
  118. assert.Assert(c, strings.Contains(strings.TrimSpace(out), pName))
  119. dockerCmd(c, "volume", "ls")
  120. }
  121. func (ps *DockerPluginSuite) TestPluginSet(c *testing.T) {
  122. client := testEnv.APIClient()
  123. name := "test"
  124. ctx, cancel := context.WithTimeout(context.Background(), 60*time.Second)
  125. defer cancel()
  126. initialValue := "0"
  127. mntSrc := "foo"
  128. devPath := "/dev/bar"
  129. // Create a new plugin with extra settings
  130. err := plugin.Create(ctx, client, name, func(cfg *plugin.Config) {
  131. cfg.Env = []types.PluginEnv{{Name: "DEBUG", Value: &initialValue, Settable: []string{"value"}}}
  132. cfg.Mounts = []types.PluginMount{
  133. {Name: "pmount1", Settable: []string{"source"}, Type: "none", Source: &mntSrc},
  134. {Name: "pmount2", Settable: []string{"source"}, Type: "none"}, // Mount without source is invalid.
  135. }
  136. cfg.Linux.Devices = []types.PluginDevice{
  137. {Name: "pdev1", Path: &devPath, Settable: []string{"path"}},
  138. {Name: "pdev2", Settable: []string{"path"}}, // Device without Path is invalid.
  139. }
  140. })
  141. assert.Assert(c, err == nil, "failed to create test plugin")
  142. env, _ := dockerCmd(c, "plugin", "inspect", "-f", "{{.Settings.Env}}", name)
  143. assert.Equal(c, strings.TrimSpace(env), "[DEBUG=0]")
  144. dockerCmd(c, "plugin", "set", name, "DEBUG=1")
  145. env, _ = dockerCmd(c, "plugin", "inspect", "-f", "{{.Settings.Env}}", name)
  146. assert.Equal(c, strings.TrimSpace(env), "[DEBUG=1]")
  147. env, _ = dockerCmd(c, "plugin", "inspect", "-f", "{{with $mount := index .Settings.Mounts 0}}{{$mount.Source}}{{end}}", name)
  148. assert.Assert(c, strings.Contains(strings.TrimSpace(env), mntSrc))
  149. dockerCmd(c, "plugin", "set", name, "pmount1.source=bar")
  150. env, _ = dockerCmd(c, "plugin", "inspect", "-f", "{{with $mount := index .Settings.Mounts 0}}{{$mount.Source}}{{end}}", name)
  151. assert.Assert(c, strings.Contains(strings.TrimSpace(env), "bar"))
  152. out, _, err := dockerCmdWithError("plugin", "set", name, "pmount2.source=bar2")
  153. assert.ErrorContains(c, err, "")
  154. assert.Assert(c, strings.Contains(out, "Plugin config has no mount source"))
  155. out, _, err = dockerCmdWithError("plugin", "set", name, "pdev2.path=/dev/bar2")
  156. assert.ErrorContains(c, err, "")
  157. assert.Assert(c, strings.Contains(out, "Plugin config has no device path"))
  158. }
  159. func (ps *DockerPluginSuite) TestPluginInstallArgs(c *testing.T) {
  160. pName := path.Join(ps.registryHost(), "plugin", "testplugininstallwithargs")
  161. ctx, cancel := context.WithTimeout(context.Background(), 60*time.Second)
  162. defer cancel()
  163. plugin.CreateInRegistry(ctx, pName, nil, func(cfg *plugin.Config) {
  164. cfg.Env = []types.PluginEnv{{Name: "DEBUG", Settable: []string{"value"}}}
  165. })
  166. out, _ := dockerCmd(c, "plugin", "install", "--grant-all-permissions", "--disable", pName, "DEBUG=1")
  167. assert.Assert(c, strings.Contains(strings.TrimSpace(out), pName))
  168. env, _ := dockerCmd(c, "plugin", "inspect", "-f", "{{.Settings.Env}}", pName)
  169. assert.Equal(c, strings.TrimSpace(env), "[DEBUG=1]")
  170. }
  171. func (ps *DockerPluginSuite) TestPluginInstallImage(c *testing.T) {
  172. testRequires(c, IsAmd64)
  173. repoName := fmt.Sprintf("%v/dockercli/busybox", privateRegistryURL)
  174. // tag the image to upload it to the private registry
  175. dockerCmd(c, "tag", "busybox", repoName)
  176. // push the image to the registry
  177. dockerCmd(c, "push", repoName)
  178. out, _, err := dockerCmdWithError("plugin", "install", repoName)
  179. assert.ErrorContains(c, err, "")
  180. assert.Assert(c, strings.Contains(out, `Encountered remote "application/vnd.docker.container.image.v1+json"(image) when fetching`))
  181. }
  182. func (ps *DockerPluginSuite) TestPluginEnableDisableNegative(c *testing.T) {
  183. pName := ps.getPluginRepoWithTag()
  184. out, _, err := dockerCmdWithError("plugin", "install", "--grant-all-permissions", pName)
  185. assert.NilError(c, err)
  186. assert.Assert(c, strings.Contains(strings.TrimSpace(out), pName))
  187. out, _, err = dockerCmdWithError("plugin", "enable", pName)
  188. assert.ErrorContains(c, err, "")
  189. assert.Assert(c, strings.Contains(strings.TrimSpace(out), "already enabled"))
  190. _, _, err = dockerCmdWithError("plugin", "disable", pName)
  191. assert.NilError(c, err)
  192. out, _, err = dockerCmdWithError("plugin", "disable", pName)
  193. assert.ErrorContains(c, err, "")
  194. assert.Assert(c, strings.Contains(strings.TrimSpace(out), "already disabled"))
  195. _, _, err = dockerCmdWithError("plugin", "remove", pName)
  196. assert.NilError(c, err)
  197. }
  198. func (ps *DockerPluginSuite) TestPluginCreate(c *testing.T) {
  199. name := "foo/bar-driver"
  200. temp, err := ioutil.TempDir("", "foo")
  201. assert.NilError(c, err)
  202. defer os.RemoveAll(temp)
  203. data := `{"description": "foo plugin"}`
  204. err = ioutil.WriteFile(filepath.Join(temp, "config.json"), []byte(data), 0644)
  205. assert.NilError(c, err)
  206. err = os.MkdirAll(filepath.Join(temp, "rootfs"), 0700)
  207. assert.NilError(c, err)
  208. out, _, err := dockerCmdWithError("plugin", "create", name, temp)
  209. assert.NilError(c, err)
  210. assert.Assert(c, strings.Contains(out, name))
  211. out, _, err = dockerCmdWithError("plugin", "ls")
  212. assert.NilError(c, err)
  213. assert.Assert(c, strings.Contains(out, name))
  214. out, _, err = dockerCmdWithError("plugin", "create", name, temp)
  215. assert.ErrorContains(c, err, "")
  216. assert.Assert(c, strings.Contains(out, "already exist"))
  217. out, _, err = dockerCmdWithError("plugin", "ls")
  218. assert.NilError(c, err)
  219. assert.Assert(c, strings.Contains(out, name))
  220. // The output will consists of one HEADER line and one line of foo/bar-driver
  221. assert.Equal(c, len(strings.Split(strings.TrimSpace(out), "\n")), 2)
  222. }
  223. func (ps *DockerPluginSuite) TestPluginInspect(c *testing.T) {
  224. pNameWithTag := ps.getPluginRepoWithTag()
  225. _, _, err := dockerCmdWithError("plugin", "install", "--grant-all-permissions", pNameWithTag)
  226. assert.NilError(c, err)
  227. out, _, err := dockerCmdWithError("plugin", "ls")
  228. assert.NilError(c, err)
  229. assert.Assert(c, strings.Contains(out, pNameWithTag))
  230. assert.Assert(c, strings.Contains(out, "true"))
  231. // Find the ID first
  232. out, _, err = dockerCmdWithError("plugin", "inspect", "-f", "{{.Id}}", pNameWithTag)
  233. assert.NilError(c, err)
  234. id := strings.TrimSpace(out)
  235. assert.Assert(c, id != "")
  236. // Long form
  237. out, _, err = dockerCmdWithError("plugin", "inspect", "-f", "{{.Id}}", id)
  238. assert.NilError(c, err)
  239. assert.Equal(c, strings.TrimSpace(out), id)
  240. // Short form
  241. out, _, err = dockerCmdWithError("plugin", "inspect", "-f", "{{.Id}}", id[:5])
  242. assert.NilError(c, err)
  243. assert.Equal(c, strings.TrimSpace(out), id)
  244. // Name with tag form
  245. out, _, err = dockerCmdWithError("plugin", "inspect", "-f", "{{.Id}}", pNameWithTag)
  246. assert.NilError(c, err)
  247. assert.Equal(c, strings.TrimSpace(out), id)
  248. // Name without tag form
  249. out, _, err = dockerCmdWithError("plugin", "inspect", "-f", "{{.Id}}", ps.getPluginRepo())
  250. assert.NilError(c, err)
  251. assert.Equal(c, strings.TrimSpace(out), id)
  252. _, _, err = dockerCmdWithError("plugin", "disable", pNameWithTag)
  253. assert.NilError(c, err)
  254. out, _, err = dockerCmdWithError("plugin", "remove", pNameWithTag)
  255. assert.NilError(c, err)
  256. assert.Assert(c, strings.Contains(out, pNameWithTag))
  257. // After remove nothing should be found
  258. _, _, err = dockerCmdWithError("plugin", "inspect", "-f", "{{.Id}}", id[:5])
  259. assert.ErrorContains(c, err, "")
  260. }
  261. // Test case for https://github.com/docker/docker/pull/29186#discussion_r91277345
  262. func (s *DockerSuite) TestPluginInspectOnWindows(c *testing.T) {
  263. // This test should work on Windows only
  264. testRequires(c, DaemonIsWindows)
  265. out, _, err := dockerCmdWithError("plugin", "inspect", "foobar")
  266. assert.ErrorContains(c, err, "")
  267. assert.Assert(c, strings.Contains(out, "plugins are not supported on this platform"))
  268. assert.ErrorContains(c, err, "plugins are not supported on this platform")
  269. }
  270. func (ps *DockerPluginSuite) TestPluginIDPrefix(c *testing.T) {
  271. name := "test"
  272. client := testEnv.APIClient()
  273. ctx, cancel := context.WithTimeout(context.Background(), 60*time.Second)
  274. initialValue := "0"
  275. err := plugin.Create(ctx, client, name, func(cfg *plugin.Config) {
  276. cfg.Env = []types.PluginEnv{{Name: "DEBUG", Value: &initialValue, Settable: []string{"value"}}}
  277. })
  278. cancel()
  279. assert.Assert(c, err == nil, "failed to create test plugin")
  280. // Find ID first
  281. id, _, err := dockerCmdWithError("plugin", "inspect", "-f", "{{.Id}}", name)
  282. id = strings.TrimSpace(id)
  283. assert.NilError(c, err)
  284. // List current state
  285. out, _, err := dockerCmdWithError("plugin", "ls")
  286. assert.NilError(c, err)
  287. assert.Assert(c, strings.Contains(out, name))
  288. assert.Assert(c, strings.Contains(out, "false"))
  289. env, _ := dockerCmd(c, "plugin", "inspect", "-f", "{{.Settings.Env}}", id[:5])
  290. assert.Equal(c, strings.TrimSpace(env), "[DEBUG=0]")
  291. dockerCmd(c, "plugin", "set", id[:5], "DEBUG=1")
  292. env, _ = dockerCmd(c, "plugin", "inspect", "-f", "{{.Settings.Env}}", id[:5])
  293. assert.Equal(c, strings.TrimSpace(env), "[DEBUG=1]")
  294. // Enable
  295. _, _, err = dockerCmdWithError("plugin", "enable", id[:5])
  296. assert.NilError(c, err)
  297. out, _, err = dockerCmdWithError("plugin", "ls")
  298. assert.NilError(c, err)
  299. assert.Assert(c, strings.Contains(out, name))
  300. assert.Assert(c, strings.Contains(out, "true"))
  301. // Disable
  302. _, _, err = dockerCmdWithError("plugin", "disable", id[:5])
  303. assert.NilError(c, err)
  304. out, _, err = dockerCmdWithError("plugin", "ls")
  305. assert.NilError(c, err)
  306. assert.Assert(c, strings.Contains(out, name))
  307. assert.Assert(c, strings.Contains(out, "false"))
  308. // Remove
  309. _, _, err = dockerCmdWithError("plugin", "remove", id[:5])
  310. assert.NilError(c, err)
  311. // List returns none
  312. out, _, err = dockerCmdWithError("plugin", "ls")
  313. assert.NilError(c, err)
  314. assert.Assert(c, !strings.Contains(out, name))
  315. }
  316. func (ps *DockerPluginSuite) TestPluginListDefaultFormat(c *testing.T) {
  317. config, err := ioutil.TempDir("", "config-file-")
  318. assert.NilError(c, err)
  319. defer os.RemoveAll(config)
  320. err = ioutil.WriteFile(filepath.Join(config, "config.json"), []byte(`{"pluginsFormat": "raw"}`), 0644)
  321. assert.NilError(c, err)
  322. name := "test:latest"
  323. client := testEnv.APIClient()
  324. ctx, cancel := context.WithTimeout(context.Background(), 60*time.Second)
  325. defer cancel()
  326. err = plugin.Create(ctx, client, name, func(cfg *plugin.Config) {
  327. cfg.Description = "test plugin"
  328. })
  329. assert.Assert(c, err == nil, "failed to create test plugin")
  330. out, _ := dockerCmd(c, "plugin", "inspect", "--format", "{{.ID}}", name)
  331. id := strings.TrimSpace(out)
  332. // We expect the format to be in `raw + --no-trunc`
  333. expectedOutput := fmt.Sprintf(`plugin_id: %s
  334. name: %s
  335. description: test plugin
  336. enabled: false`, id, name)
  337. out, _ = dockerCmd(c, "--config", config, "plugin", "ls", "--no-trunc")
  338. assert.Assert(c, strings.Contains(strings.TrimSpace(out), expectedOutput))
  339. }
  340. func (s *DockerSuite) TestPluginUpgrade(c *testing.T) {
  341. testRequires(c, DaemonIsLinux, Network, testEnv.IsLocalDaemon, IsAmd64, NotUserNamespace)
  342. plugin := "cpuguy83/docker-volume-driver-plugin-local:latest"
  343. pluginV2 := "cpuguy83/docker-volume-driver-plugin-local:v2"
  344. dockerCmd(c, "plugin", "install", "--grant-all-permissions", plugin)
  345. dockerCmd(c, "volume", "create", "--driver", plugin, "bananas")
  346. dockerCmd(c, "run", "--rm", "-v", "bananas:/apple", "busybox", "sh", "-c", "touch /apple/core")
  347. out, _, err := dockerCmdWithError("plugin", "upgrade", "--grant-all-permissions", plugin, pluginV2)
  348. assert.ErrorContains(c, err, "", out)
  349. assert.Assert(c, strings.Contains(out, "disabled before upgrading"))
  350. out, _ = dockerCmd(c, "plugin", "inspect", "--format={{.ID}}", plugin)
  351. id := strings.TrimSpace(out)
  352. // make sure "v2" does not exists
  353. _, err = os.Stat(filepath.Join(testEnv.DaemonInfo.DockerRootDir, "plugins", id, "rootfs", "v2"))
  354. assert.Assert(c, os.IsNotExist(err), "%s", out)
  355. dockerCmd(c, "plugin", "disable", "-f", plugin)
  356. dockerCmd(c, "plugin", "upgrade", "--grant-all-permissions", "--skip-remote-check", plugin, pluginV2)
  357. // make sure "v2" file exists
  358. _, err = os.Stat(filepath.Join(testEnv.DaemonInfo.DockerRootDir, "plugins", id, "rootfs", "v2"))
  359. assert.NilError(c, err)
  360. dockerCmd(c, "plugin", "enable", plugin)
  361. dockerCmd(c, "volume", "inspect", "bananas")
  362. dockerCmd(c, "run", "--rm", "-v", "bananas:/apple", "busybox", "sh", "-c", "ls -lh /apple/core")
  363. }
  364. func (s *DockerSuite) TestPluginMetricsCollector(c *testing.T) {
  365. testRequires(c, DaemonIsLinux, Network, testEnv.IsLocalDaemon, IsAmd64)
  366. d := daemon.New(c, dockerBinary, dockerdBinary)
  367. d.Start(c)
  368. defer d.Stop(c)
  369. name := "cpuguy83/docker-metrics-plugin-test:latest"
  370. r := cli.Docker(cli.Args("plugin", "install", "--grant-all-permissions", name), cli.Daemon(d))
  371. assert.Assert(c, r.Error == nil, r.Combined())
  372. // plugin lisens on localhost:19393 and proxies the metrics
  373. resp, err := http.Get("http://localhost:19393/metrics")
  374. assert.NilError(c, err)
  375. defer resp.Body.Close()
  376. b, err := ioutil.ReadAll(resp.Body)
  377. assert.NilError(c, err)
  378. // check that a known metric is there... don't expect this metric to change over time.. probably safe
  379. assert.Assert(c, strings.Contains(string(b), "container_actions"))
  380. }