コード例 #1
0
			activated, err := virtualGuestService.ActivatePublicPort(virtualGuest.Id)

			Expect(err).ToNot(HaveOccurred())
			Expect(activated).To(BeTrue())
		})
	})

	Context("#ShutdownPrivatePort", func() {
		BeforeEach(func() {
			virtualGuest.Id = 1234567
			fakeClient.DoRawHttpRequestResponse, err = testhelpers.ReadJsonTestFixtures("services", "SoftLayer_Virtual_Guest_Service_shutdownPrivatePort.json")
			Expect(err).ToNot(HaveOccurred())
		})

		It("shutdown private port for virtual guest instance", func() {
			shutdowned, err := virtualGuestService.ShutdownPrivatePort(virtualGuest.Id)

			Expect(err).ToNot(HaveOccurred())
			Expect(shutdowned).To(BeTrue())
		})
	})

	Context("#ShutdownPublicPort", func() {
		BeforeEach(func() {
			virtualGuest.Id = 1234567
			fakeClient.DoRawHttpRequestResponse, err = testhelpers.ReadJsonTestFixtures("services", "SoftLayer_Virtual_Guest_Service_shutdownPublicPort.json")
			Expect(err).ToNot(HaveOccurred())
		})

		It("shuts down public port for virtual guest instance", func() {
			shutdowned, err := virtualGuestService.ShutdownPublicPort(virtualGuest.Id)