Skip to content
This repository was archived by the owner on Dec 31, 2023. It is now read-only.

docs(samples): Bulk insert sample #299

Merged
merged 12 commits into from
Jul 6, 2022
Merged
Prev Previous commit
Next Next commit
Fixing lint problems.
  • Loading branch information
m-strzelczyk committed Jun 27, 2022
commit 27b89e329024416bc54933abd075911245bb324c
6 changes: 4 additions & 2 deletions samples/ingredients/instances/bulk_insert.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from google.cloud import compute_v1
from typing import Optional, Iterable
# flake8: noqa
from typing import Iterable, Optional
import uuid

from google.cloud import compute_v1


# <INGREDIENT bulk_insert_instance>
def bulk_insert_instance(project_id: str, zone: str, template: compute_v1.InstanceTemplate,
Expand Down
9 changes: 6 additions & 3 deletions samples/snippets/tests/test_bulk.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,19 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import pytest
import google.auth
import uuid

import google.auth
from google.cloud import compute_v1
from ..instances.delete import delete_instance
import pytest

from ..instances.bulk_insert import create_five_instances
from ..instances.delete import delete_instance

PROJECT = google.auth.default()[1]
INSTANCE_ZONE = "europe-north1-a"


@pytest.fixture
def instance_template():
disk = compute_v1.AttachedDisk()
Expand Down