Skip to content

Commit a269ff5

Browse files
yt-msMidnighter
authored andcommitted
feat(examples): uncomment deployment view code in BigBank example
1 parent 756b85d commit a269ff5

File tree

1 file changed

+24
-16
lines changed

1 file changed

+24
-16
lines changed

examples/big_bank.py

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -354,10 +354,10 @@ def create_big_bank_workspace():
354354
secondary_database = secondary_database_server.add_container(database)
355355

356356
# # model.Relationships.Where(r=>r.Destination.Equals(secondary_database)).ToList().ForEach(r=>r.tags.add(failover_tag))
357-
# dataReplicationRelationship = primary_database_server.uses(
358-
# secondary_database_server, "Replicates data to", ""
359-
# )
360-
# secondary_database.tags.add(failover_tag)
357+
data_replication_relationship = primary_database_server.uses(
358+
secondary_database_server, "Replicates data to"
359+
)
360+
secondary_database.tags.add(failover_tag)
361361

362362
# views/diagrams
363363
system_landscape_view = views.create_system_landscape_view(
@@ -428,18 +428,26 @@ def create_big_bank_workspace():
428428
# dynamicView.Add(securityComponent, "select * from users where username = ?", database)
429429
# dynamicView.PaperSize = PaperSize.A5_Landscape
430430

431-
# DeploymentView developmentDeploymentView = views.CreateDeploymentView(internet_banking_system, "DevelopmentDeployment", "An example development deployment scenario for the Internet Banking System.")
432-
# developmentDeploymentView.Environment = "Development"
433-
# developmentDeploymentView.Add(developerLaptop)
434-
# developmentDeploymentView.PaperSize = PaperSize.A5_Landscape
435-
436-
# DeploymentView liveDeploymentView = views.CreateDeploymentView(internet_banking_system, "LiveDeployment", "An example live deployment scenario for the Internet Banking System.")
437-
# liveDeploymentView.Environment = "Live"
438-
# liveDeploymentView.Add(big_bank_data_center)
439-
# liveDeploymentView.Add(customerMobileDevice)
440-
# liveDeploymentView.Add(customerComputer)
441-
# liveDeploymentView.Add(dataReplicationRelationship)
442-
# liveDeploymentView.PaperSize = PaperSize.A5_Landscape
431+
development_deployment_view = views.create_deployment_view(
432+
software_system=internet_banking_system,
433+
key="DevelopmentDeployment",
434+
description="An example development deployment scenario for the Internet Banking System.",
435+
environment="Development",
436+
)
437+
development_deployment_view.add(developer_laptop)
438+
development_deployment_view.paper_size = PaperSize.A5_Landscape
439+
440+
live_deployment_view = views.create_deployment_view(
441+
software_system=internet_banking_system,
442+
key="LiveDeployment",
443+
description="An example live deployment scenario for the Internet Banking System.",
444+
environment="Live",
445+
)
446+
live_deployment_view += big_bank_data_center
447+
live_deployment_view += customer_mobile_device
448+
live_deployment_view += customer_computer
449+
live_deployment_view += data_replication_relationship
450+
live_deployment_view.paper_size = PaperSize.A5_Landscape
443451

444452
# colours, shapes and other diagram styling
445453
styles = views.configuration.styles

0 commit comments

Comments
 (0)