Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 839 for portVal (0.21 sec)

  1. docs_src/response_model/tutorial003_04.py

    from fastapi.responses import RedirectResponse
    
    app = FastAPI()
    
    
    @app.get("/portal")
    async def get_portal(teleport: bool = False) -> Union[Response, dict]:
        if teleport:
            return RedirectResponse(url="https://www.youtube.com/watch?v=dQw4w9WgXcQ")
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Tue Jan 10 16:22:47 UTC 2023
    - 384 bytes
    - Viewed (0)
  2. docs_src/response_model/tutorial003_05.py

    from fastapi.responses import RedirectResponse
    
    app = FastAPI()
    
    
    @app.get("/portal", response_model=None)
    async def get_portal(teleport: bool = False) -> Union[Response, dict]:
        if teleport:
            return RedirectResponse(url="https://www.youtube.com/watch?v=dQw4w9WgXcQ")
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Tue Jan 10 16:22:47 UTC 2023
    - 405 bytes
    - Viewed (0)
  3. pkg/volume/iscsi/iscsi_test.go

    		t.Errorf("Expected true for mounter.IsReadOnly")
    	}
    }
    
    func TestPortalMounter(t *testing.T) {
    	if portal := portalMounter("127.0.0.1"); portal != "127.0.0.1:3260" {
    		t.Errorf("wrong portal: %s", portal)
    	}
    	if portal := portalMounter("127.0.0.1:3260"); portal != "127.0.0.1:3260" {
    		t.Errorf("wrong portal: %s", portal)
    	}
    }
    
    type testcase struct {
    	name      string
    	defaultNs string
    	spec      *volume.Spec
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Aug 01 15:56:32 UTC 2022
    - 16.4K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_dependencies/test_tutorial008d_an_py39.py

            client.get("/items/portal-gun")
        assert (
            exc_info.value.args[0] == "The portal gun is too dangerous to be owned by Rick"
        )
    
    
    @needs_py39
    def test_internal_server_error():
        from docs_src.dependencies.tutorial008d_an_py39 import app
    
        client = TestClient(app, raise_server_exceptions=False)
        response = client.get("/items/portal-gun")
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Feb 24 23:06:37 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_dependencies/test_tutorial008d.py

            client.get("/items/portal-gun")
        assert (
            exc_info.value.args[0] == "The portal gun is too dangerous to be owned by Rick"
        )
    
    
    def test_internal_server_error():
        from docs_src.dependencies.tutorial008d import app
    
        client = TestClient(app, raise_server_exceptions=False)
        response = client.get("/items/portal-gun")
        assert response.status_code == 500, response.text
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Feb 24 23:06:37 UTC 2024
    - 1.2K bytes
    - Viewed (0)
  6. docs_src/path_operation_advanced_configuration/tutorial005.py

    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/items/", openapi_extra={"x-aperture-labs-portal": "blue"})
    async def read_items():
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Jul 29 20:01:13 UTC 2021
    - 180 bytes
    - Viewed (0)
  7. docs_src/dependencies/tutorial008d.py

            raise
    
    
    @app.get("/items/{item_id}")
    def get_item(item_id: str, username: str = Depends(get_username)):
        if item_id == "portal-gun":
            raise InternalError(
                f"The portal gun is too dangerous to be owned by {username}"
            )
        if item_id != "plumbus":
            raise HTTPException(
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Feb 24 23:06:37 UTC 2024
    - 694 bytes
    - Viewed (0)
  8. docs_src/dependencies/tutorial008d_an.py

            raise
    
    
    @app.get("/items/{item_id}")
    def get_item(item_id: str, username: Annotated[str, Depends(get_username)]):
        if item_id == "portal-gun":
            raise InternalError(
                f"The portal gun is too dangerous to be owned by {username}"
            )
        if item_id != "plumbus":
            raise HTTPException(
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Feb 24 23:06:37 UTC 2024
    - 744 bytes
    - Viewed (0)
  9. docs_src/dependencies/tutorial008c.py

            print("Oops, we didn't raise again, Britney 😱")
    
    
    @app.get("/items/{item_id}")
    def get_item(item_id: str, username: str = Depends(get_username)):
        if item_id == "portal-gun":
            raise InternalError(
                f"The portal gun is too dangerous to be owned by {username}"
            )
        if item_id != "plumbus":
            raise HTTPException(
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Feb 24 23:06:37 UTC 2024
    - 660 bytes
    - Viewed (0)
  10. pkg/volume/iscsi/attacher.go

    	if err != nil {
    		klog.Warningf("failed to get iscsi mounter: %v", err)
    		return "", err
    	}
    	if mounter.InitiatorName != "" {
    		// new iface name is <target portal>:<volume name>
    		mounter.Iface = mounter.Portals[0] + ":" + mounter.VolName
    	}
    	return attacher.manager.MakeGlobalPDName(*mounter.iscsiDisk), nil
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Aug 04 08:51:31 UTC 2022
    - 6.8K bytes
    - Viewed (0)
Back to top